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

Add client and service decorators to track requests using Dropwizard … #115

Merged
merged 1 commit into from
Feb 24, 2016

Conversation

anuraaga
Copy link
Collaborator

…metrics.

@anuraaga
Copy link
Collaborator Author

PTAL @trustin @blmarket

@blmarket
Copy link
Contributor

Can you explain more about why implemented new one instead of using MetricCollectingService? current pr seems well suited in existing interface.

Timer.Context timer = metrics.time();
promise.addListener(future -> {
timer.stop();
if (future.isSuccess()) {
Copy link
Contributor

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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just newDecorator()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or.. newDropwizardDecorator()?

Copy link
Collaborator Author

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.

@anuraaga
Copy link
Collaborator Author

Updated

@trustin
Copy link
Member

trustin commented Feb 23, 2016

We have two Javadoc errors:
https://travis-ci.org/line/armeria/builds/111158179#L6707

* .build(MyService.Iface.class);
* }
* </pre>
* </p>
Copy link
Member

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] ^

@blmarket
Copy link
Contributor

LGTM 👍

trustin added a commit that referenced this pull request Feb 24, 2016
Add client and service decorators to track requests using Dropwizard …
@trustin trustin merged commit 629eb57 into line:master Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants