You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dropwizard app running metrics-datadog 1.1.13. I added a metrics section to my yaml file with a datadog reporter session. My service endpoints are reporting like magic.
What isn't reporting is a gauge I placed in the run() method of my application class.
The gauge looks like
environment.metrics().register(MetricRegistry.name(Application.class, "version"),
new Gauge<String>() {
@Override
public String getValue() {
return "1.1.1";
}
});
The gauge shows up fine when I curl the /metrics endpoint of the admin servlet.
I'm wondering if perhaps it has to do with the dropwizard lifecycle, or metrics-datadog not being initialized when the gauge is used in the run() method.
The gauge does show up in the console reporter.
The text was updated successfully, but these errors were encountered:
@DevOpsJon Sorry for the delay in getting back to you. The Gauge you've set up looks correct. The initialization order shouldn't really matter, as the MetricsRegistry is polled on every reporting cycle (defaults to every 10 seconds). That said, I'm not really familiar with the Dropwizard framework, so I may be missing something here.
I have a dropwizard app running metrics-datadog 1.1.13. I added a metrics section to my yaml file with a datadog reporter session. My service endpoints are reporting like magic.
What isn't reporting is a gauge I placed in the run() method of my application class.
The gauge looks like
The gauge shows up fine when I curl the /metrics endpoint of the admin servlet.
I'm wondering if perhaps it has to do with the dropwizard lifecycle, or metrics-datadog not being initialized when the gauge is used in the run() method.
The gauge does show up in the console reporter.
The text was updated successfully, but these errors were encountered: