Can we disable or enable specific metrics #6752
Replies: 2 comments
-
hi @ychaydhari! the javaagent supports yaml-based view configuration: https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/incubator#view-file-configuration you should be able to create a yaml-based view that drops specific metrics |
Beta Was this translation helpful? Give feedback.
-
hi @trask this is a potential big win for quick adoption of getting custom metrics using opentelmetry instead of other tools with easy integration of custom metrics like datadog which can really rack up the cost, not to mention vendor lock-in Could you help with a real world example? I'm hoping that this use case applies. We are trying to use a least-intrusive-code approach and have added the following implementation for simple metrics by adding to the configuration: import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.aop.TimedAspect;
import io.micrometer.core.aop.CountedAspect;
...
@Bean
public TimedAspect timedAspect(MeterRegistry registry) {
return new TimedAspect(registry);
}
@Bean
public CountedAspect countedAspect(MeterRegistry registry) {
return new CountedAspect(registry);
} And using annotations in front of methods as import io.micrometer.core.annotation.Counted;
import io.micrometer.core.annotation.Timed;
...
@Timed("custom.metric.mycompany.MyNewMetric")
public String zzz() { ... Could you suggest a config file that would add all "custom.metric.mycompany.*" micrometer metrics? We will be modifying a few hundred applications across business units so keeping it very simple is must for adoption |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
we are using the spring boot application and it's auto-instrumented. we have added a few asynchronous metrics using OTEL API. Our requirement is like users can enable or disable specific metrics if they don't need them.
Can we implement this functionality for metrics?
Beta Was this translation helpful? Give feedback.
All reactions