Is there a way to disable reporting the java SDK observability metrics? Either all of them or only report observability metrics with a certain prefix?
Been looking on the docs, Temporal forums and Datadog docs but haven’t been able to find anything talking about disabling the metrics.
It seems by default we send out Temporal metrics to statsd, it’d be nice to either only send out our own custom defined metrics rather than all of the Temporal ones as well.
Hi @Harrison_Li
From the link you have shared I assume you are using Micrometer (and not opentelemetry), if so you can use Prometheus filter to filter out metrics, see Add possibility to filter out metrics by name in prometheus scrape · Issue #1758 · micrometer-metrics/micrometer · GitHub
I think it should be something like
PrometheusMeterRegistry registry = new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
registry.config().meterFilter...
Antonio
Thanks for the reply @antonio.perez. I’ll keep your answer in mind.
As a stop gap, we disabled the statsd client for that specific Temporal project. As, we didn’t have a need for any DD metrics from that project. In the future it might be handy to figure out how to more specifically disable those SDK metrics, and if we do I’ll post an update on which method we end up using.
1 Like