Disable all metrics by default and then enable specific library metrics #10284
Replies: 4 comments 8 replies
-
Hi @srinusanduri! Which metrics are you wanting to disable? |
Beta Was this translation helpful? Give feedback.
-
Hi @trask I have tried your suggestion using below view config to drop all metrics except agent specific one.. but some reason its not working as expected and droping all metrics , I think it may be due to conflicting selector config at the end with * .. but as per this it looks DropAggregation should not result in conflicting metric identities. could you check and suggest correct view config? `
` |
Beta Was this translation helpful? Give feedback.
-
it looks selector instrument_name config doesn't support all regex pattern charatcters except "*" and "." ,otherwise I could have simplified my view config, some thing like below to exclude all metrics except agent specific metrics -selector: |
Beta Was this translation helpful? Give feedback.
-
Hi @umakarnati - it looks live you've got some typos in your view config. You're using I would recommend more simply selecting the meter names you want to enable, instead of the instrument names. I believe the following reflects the config you're going for:
It captures internal metrics from the OTLP span / log exporters and batch span / log processors. It worked for me. |
Beta Was this translation helpful? Give feedback.
-
The agent configuration properties
-Dotel.instrumentation.common.default-enabled=false
and-Dotel.instrumentation.[name].enabled=true
mentioned here allows us to disable all instrumentations by default and enable specific library instrumentations. But this applies for both traces and metrics instrumentation.Our requirement is to enable traces by default and enable metrics for specific libraries only. We want metrics instrumentation to be disabled by default and then enable specific libraries for metrics instrumentation without affecting trace instrumentation. Please suggest the configurations required to achive this behavior.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions