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 group and type to annotations #155

Merged
merged 3 commits into from Feb 26, 2012

Conversation

samperman
Copy link

This change adds two attributes to the various metric annotations:

  • group
  • type

Both are optional and the behavior if they are omitted should be the same as before. The main objective was to simplify the names that ultimately make their way into graphite. Sorry for the three commits. I originally had this in a different server and pull it into this one.

Sam Perman added 3 commits February 8, 2012 08:56
Metered, Timed, ExceptionMetered, and Guage have all been updated to support
two new attributes on the annotation:
- group - if omitted, defaults to the package name (as before)

- name - if omitted, defaults to simple class name (as before)

This involved changing the Guice annotation support code to check for these
attributes as well as the jersey dispatcher code for the same reason.
In order to make the behavior consistent across the two, the methods
for choosing the appropriate value have been placed into MetricName
as static methods.
also cleaned up some minor typos and extraneous imports
Metered, Timed, ExceptionMetered, and Gauge have all been updated to support
two new attributes on the annotation:

- group - if omitted, defaults to the package name (as before)

- type - if omitted, defaults to simple class name (as before)

This involved changing the guice annotation support code to check for these
attributes as well as the jersey dispatcher code for the same reason.
In order to make the behavior consistent across the two, the methods
for choosing the appropriate value have been placed into MetricName
as static methods.

Also clean up a couple tests so they pass on windows.
codahale added a commit that referenced this pull request Feb 26, 2012
@codahale codahale merged commit d535e4e into dropwizard:master Feb 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants