In Metrics component of Apache Camel 2.14, I'm trying to set the name of counters using Simple Expression Language but it seems that the metrics component is just not using it.
I've tried :
from("direct:foo").routeId("routeFoo")
.to("metrics:counter:${id}")
And
from("direct:foo").routeId("routeFoo")
.to("metrics:counter:"+ simple("${id}"))
But in both cases, the name of the counter is set to ${id}.
Is there anyway to use an expression language in this components URI ?
Thanks
EDIT :
Adding a header do the job :
.setHeader(MetricsConstants.HEADER_METRIC_NAME, simple("${id}.${header.operationName}"))
But it would be more convenient to user SEL directly in URI.