Hello Rest Api lovers !!
I created a DropWizard basic rest application. I would like to view metrics but ONLY MY CUSTOM ONES and not dropwizard api's. how can i disable dropwizard's healtCheks and Metrics and only view mines (the custum ones). I hope it is clear....
environment.getAdminContext().setAttribute(MetricsServlet.METRIC_FILTER, new MetricFilter() {
@Override
public boolean matches(final String name, final Metric metric) {
return // you logic;
}
});
environment.getAdminContext().setAttribute(HealthCheckServlet.HEALTH_CHECK_FILTER, new HealthCheckFilter() {
@Override
public boolean matches(final String s, final HealthCheck healthCheck) {
return // you logic;
}
});
environment.healthChecks().unregister();
environment.metrics().remove();