Filter on custom field for service graph #4097
-
Hi guys, I am working on implementing opentelemetry inside my project. Was already able to send spans, with valid info between them to create good looking traces :) I enabled generation of service graph and they work as expected. Now the next step is to have a possibility to filter on spans and service graph per environment I use. I added a custom attribute to the the Resource and later same value to Span itself and I am able to filter spans/traces using this value. If it comes to the service graph there is no such possibility. Filters there are predefined and I can not find any information if it is possible and how to have a similar filtering as I explained above for spans. Could someone tell me if it is possible and if this is the wrong way - how to achieve similar result? I would like to see spans and graphs per my environment. Running multiple instances of whole stack is not possible for me at the moment and sound like overkill. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The metrics generator has the ability to attach custom labels to your metrics using the values of attributes in your spans. Be warned that if misconfigured it can generate a very large number of series (i.e. if you choose a high cardinality attribute). https://grafana.com/docs/tempo/latest/configuration/#metrics-generator Look for "dimensions" under the service graph and span metric processors. |
Beta Was this translation helpful? Give feedback.
The metrics generator has the ability to attach custom labels to your metrics using the values of attributes in your spans. Be warned that if misconfigured it can generate a very large number of series (i.e. if you choose a high cardinality attribute).
https://grafana.com/docs/tempo/latest/configuration/#metrics-generator
Look for "dimensions" under the service graph and span metric processors.