Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetty HttpClient metrics #2019

Closed
jkschneider opened this issue Apr 22, 2020 · 0 comments
Closed

Jetty HttpClient metrics #2019

jkschneider opened this issue Apr 22, 2020 · 0 comments
Labels
enhancement A general enhancement
Milestone

Comments

@jkschneider
Copy link
Contributor

Performs request timing and request content size measuring with a distribution summary.

HttpClient httpClient = new HttpClient()
httpClient.getRequestListeners().add(
  JettyClientMetrics
    .builder(registry, result -> result.getRequest().getURI().getPath()) <1>
    .timingMetricName("jetty.client.requests") // optional
    .contentSizeMetricName("jetty.client.request.size") // optional
    .maxUriTags(1000) // optional
    .build()
);

<1> Make this better at replacing with path variables and stripping request params. This has to be user-provided logic, because HttpClient doesn't have a built-in path variable substitution mechanism.

@jkschneider jkschneider added this to the 1.5.0 milestone Apr 22, 2020
@jkschneider jkschneider added the enhancement A general enhancement label Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant