Skip to content

Commit

Permalink
Backport a fix from micrometer repo for this
Browse files Browse the repository at this point in the history
  • Loading branch information
jansupol committed Jul 4, 2024
1 parent 1e68502 commit 20a4e54
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 20a4e54

Please sign in to comment.