@Override public MetricsService getService() { if (metricsService != null && metricsService.isEnabled()) { return metricsService; } return null; }