Added the LDAP operation type and error name in the metric - #51491
Conversation
cd24bd9 to
1cf7c5a
Compare
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.actions.TermsAndConditionsTest#termsAcceptedKeycloak CI - Forms IT (firefox) |
There was a problem hiding this comment.
Pull request overview
Adds operation and error labels to LDAP request metrics.
Changes:
- Adds LDAP operation names to execute metrics.
- Adds exception class names to failed request metrics.
- Classifies supported LDAP operations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
LDAPOperationManager.java |
Adds operation and error metric tags. |
LDAPContextManager.java |
Adds error tags to connection metrics. |
Suppressed comments (1)
federation/ldap/src/main/java/org/keycloak/storage/ldap/idm/store/ldap/LDAPOperationManager.java:865
- The linked issue requires changing the LDAP execute trace spans, but these values are only added to the timer. The span is still named
LDAPOperationManager.execute, still stores the full multi-lineoperation.toString(), and receives no structured operation/error/DN attributes, so closing #50958 would leave all of its stated trace problems unresolved; update the span instrumentation or stop closing that issue.
recordLdapRequest("execute", operation.operationType(), success, startTimeNanos, errorName);
|
@ruchikajha95 do we need both |
The idea was "operation" tag = "execute" or "authenticate" : this is the high-level category
|
|
Can you list all possible values? if edit: I'm asking this because PromQL allows query aggregation, making the |
The complete list of possible values are :
|
Yes, that's my suggestion. |
b0f709f to
575650c
Compare
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#salesPostEncSignedAssertionsOnlyTestKeycloak CI - Adapter IT Strict Cookies |
1af4829 to
f32440f
Compare
f32440f to
d98ec23
Compare
Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com>
Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com>
Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com>
Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com>
d98ec23 to
dc3ed3d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
federation/ldap/src/main/java/org/keycloak/storage/ldap/idm/store/ldap/LDAPOperationManager.java:865
- The linked issue requires operation/error details on
LDAPOperationManager.executetrace spans, but these values are only passed to the request timer here. The span is still namedLDAPOperationManager.executeand still storesoperation.toString()as one multiline attribute, so the reported tracing problem remains unchanged; apply the operation type and structured operation/error fields to the span as well.
recordLdapRequest(operation.operationType(), success, startTimeNanos, errorName);
…51491) * Added the LDAP operation type and error name in the metric Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com> * Resolved the pr review comments Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com> * Resolved the pr review comments Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com> * changed the operation tags Closes keycloak#50958 Signed-off-by: Ruchika <ruchika.jha1@ibm.com> --------- Signed-off-by: Ruchika <ruchika.jha1@ibm.com> Signed-off-by: Michal Vavřík <dev@michalvavrik.net>
Closes #50958
Signed-off-by: Ruchika ruchika.jha1@ibm.com