@Test public void testStartRequestMonitoring() { requestMetrics.startCrudRequest("save", "name", null); Assert.assertNotNull(metricsRegistry.getCounters()); Assert.assertNotNull(metricsRegistry.getTimers()); Counter activeRequestCounter = metricsRegistry.counter("request.crud.save.name.default.active"); Timer completedRequestTimer = metricsRegistry.timer("request.crud.save.name.default"); Assert.assertEquals(1, activeRequestCounter.getCount()); Assert.assertEquals(0, completedRequestTimer.getCount()); }
@Override public Context startCrudRequest(String operation, String entity, String version) { return new DropwizardContext(metricNamer.crud(operation, entity, version)); }
DropwizardRequestMetrics implements RequestMetrics { @Override public Context startCrudRequest(String operation, String entity, String version) { return new DropwizardContext(metricNamer.crud(operation, entity, version)); } }
DropwizardRequestMetrics implements RequestMetrics { @Override public Context startCrudRequest(String operation, String entity, String version) { return new DropwizardContext(metricNamer.crud(operation, entity, version)); } DropwizardRequestMetrics(MetricRegistry metricRegistry);  DropwizardRequestMetrics(MetricRegistry metricRegistry, MetricNamer metricNamer); }
DropwizardRequestMetrics implements RequestMetrics { @Override public Context startCrudRequest(String operation, String entity, String version) { return new DropwizardContext(metricNamer.crud(operation, entity, version)); } DropwizardRequestMetrics(MetricRegistry metricRegistry);  DropwizardRequestMetrics(MetricRegistry metricRegistry, MetricNamer metricNamer); static DropwizardRequestMetrics withDefaultMBeans(MetricRegistry registry); @Override Context startCrudRequest(String operation, String entity, String version); @Override Context startStreamingCrudRequest(String operation, String entity, String version); @Override Context startLockRequest(String lockOperation, String domain); @Override Context startHealthRequest(); @Override Context startDiagnosticsRequest(); @Override Context startSavedSearchRequest(String searchName, String entity, String version); @Override Context startBulkRequest(); @Override Context startGenerateRequest(String entity, String version, String field); }
DropwizardRequestMetrics implements RequestMetrics { @Override public Context startCrudRequest(String operation, String entity, String version) { return new DropwizardContext(metricNamer.crud(operation, entity, version)); } DropwizardRequestMetrics(MetricRegistry metricRegistry);  DropwizardRequestMetrics(MetricRegistry metricRegistry, MetricNamer metricNamer); static DropwizardRequestMetrics withDefaultMBeans(MetricRegistry registry); @Override Context startCrudRequest(String operation, String entity, String version); @Override Context startStreamingCrudRequest(String operation, String entity, String version); @Override Context startLockRequest(String lockOperation, String domain); @Override Context startHealthRequest(); @Override Context startDiagnosticsRequest(); @Override Context startSavedSearchRequest(String searchName, String entity, String version); @Override Context startBulkRequest(); @Override Context startGenerateRequest(String entity, String version, String field);  }