@SuppressWarnings("unchecked")
T endpoint = (T) getEndpoint();
Message in = exchange.getIn();
String defaultMetricsName = endpoint.getMetricsName();
String finalMetricsName = getMetricsName(in, defaultMetricsName);
MetricRegistry registry = endpoint.getRegistry();
try {
doProcess(exchange, endpoint, registry, finalMetricsName);
} catch (Exception e) {
LOG.warn("Failed to produce metrics for {} in {} - {}", new Object[] {
finalMetricsName, getClass().getSimpleName(), e.getMessage() });