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 a way to uninstrument JVM metrics #109

Open
timmc opened this issue Sep 21, 2016 · 1 comment
Open

Add a way to uninstrument JVM metrics #109

timmc opened this issue Sep 21, 2016 · 1 comment

Comments

@timmc
Copy link

timmc commented Sep 21, 2016

If I call metrics.jvm.core/instrument-jvm during startup, there is no corresponding metrics.jvm.core/uninstrument-jvm to call during shutdown. This causes problems for me during tests that check startup and shutdown behavior; if I call instrument-jvm twice I get an error "A metric named jvm.attribute.vendor already exists".

I suppose a less desirable alternative that would still address my use-case would be to make instrumentation idempotent. A clean shutdown would be my preference.

@timmc
Copy link
Author

timmc commented Sep 21, 2016

Implementation note: remove-metric is not the inverse of add-metric since the latter will expand MetricSets into multiple names and metrics. :-(

dropwizard/metrics#1007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant