Skip to content

Commit

Permalink
Polish Vertx metrics by using records for context classes
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Sep 17, 2024
1 parent 3a4ebc5 commit b401b5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,6 @@ public String getNormalizedUriPath(Map<Pattern, String> serverMatchPatterns, Lis
}
}

private static class DefaultContext implements HttpClientMetricsTagsContributor.Context {
private final HttpRequest request;

private DefaultContext(HttpRequest request) {
this.request = request;
}

@Override
public HttpRequest request() {
return request;
}
private record DefaultContext(HttpRequest request) implements HttpClientMetricsTagsContributor.Context {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,6 @@ public void disconnected(LongTaskTimer.Sample websocketMetric) {
}
}

private static class DefaultContext implements HttpServerMetricsTagsContributor.Context {
private final HttpServerRequest request;

private DefaultContext(HttpServerRequest request) {
this.request = request;
}

@Override
public HttpServerRequest request() {
return request;
}
private record DefaultContext(HttpServerRequest request) implements HttpServerMetricsTagsContributor.Context {
}
}

0 comments on commit b401b5f

Please sign in to comment.