-
Notifications
You must be signed in to change notification settings - Fork 902
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
Add client and service decorators to track requests using Dropwizard … #115
Conversation
Can you explain more about why implemented new one instead of using |
Timer.Context timer = metrics.time(); | ||
promise.addListener(future -> { | ||
timer.stop(); | ||
if (future.isSuccess()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to check its status code? i.e. is it successful even if future is 500
or so?
* <p>It is generally recommended to define your own name for the service instead of using something like | ||
* the Java class to make sure otherwise safe changes like renames don't break metrics.</p> | ||
*/ | ||
public static Function<Client, Client> newDropwizardMetricsDecorator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just newDecorator()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or.. newDropwizardDecorator()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with newDropwizardDecorator, but in practice maybe there won't be any other implementations.
Updated |
We have two Javadoc errors: |
* .build(MyService.Iface.class); | ||
* } | ||
* </pre> | ||
* </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Idea why, but Javadoc still complains. Could you fix this?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project armeria: Error generating maven-javadoc-plugin:2.10.3:javadoc:
[ERROR] Exit code: 1 - /home/travis/build/line/armeria/src/main/java/com/linecorp/armeria/client/metrics/MetricCollectingClient.java:25: error: unexpected end tag: </p>
[ERROR] * </p>
[ERROR] ^
[ERROR] /home/travis/build/line/armeria/src/main/java/com/linecorp/armeria/server/metrics/MetricCollectingService.java:45: error: unexpected end tag: </p>
[ERROR] * </p>
[ERROR] ^
LGTM 👍 |
Add client and service decorators to track requests using Dropwizard …
…metrics.