Skip to content

Commit

Permalink
Backport a fix from micrometer repo for this
Browse files Browse the repository at this point in the history
micrometer-metrics/micrometer@66c1d47

Signed-off-by: jansupol <jan.supol@oracle.com>
  • Loading branch information
jansupol authored and senivam committed Jul 16, 2024
1 parent 6380dc5 commit 80951a4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class JerseyKeyValues {
private static final KeyValue URI_ROOT = JerseyObservationDocumentation.JerseyLegacyLowCardinalityTags.URI
.withValue("root");

private static final KeyValue URI_UNKNOWN = JerseyObservationDocumentation.JerseyLegacyLowCardinalityTags.URI
.withValue("UNKNOWN");

private static final KeyValue EXCEPTION_NONE = JerseyObservationDocumentation.JerseyLegacyLowCardinalityTags.EXCEPTION
.withValue("None");

Expand Down Expand Up @@ -106,6 +109,9 @@ static KeyValue uri(RequestEvent event) {
}
}
String matchingPattern = JerseyTags.getMatchingPattern(event);
if (matchingPattern == null) {
return URI_UNKNOWN;
}
if (matchingPattern.equals("/")) {
return URI_ROOT;
}
Expand Down

0 comments on commit 80951a4

Please sign in to comment.