You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I have an OpenTelemetry Collector that receives telemetry data from several different (untracked) sources, and then the collector sends these out to different backends depending on whether they are traces, logs, or metrics. Those sources differentiate themselves by setting a resource attribute to a specific value, so that they can find their data in the backends.
Now I am trying to see, based on this resource attribute, how many traces, logs, and metrics, are being sent through my Collector by each source.
One way I tried to do this was to leverage the exposed prometheus metrics. I used the prometheus receiver to scrape the otel-collector metrics, and then used the prometheusremotewrite exporter to push to a prometheus instance with the resource_to_telemetry_conversion flag enabled.
This idea was to use metrics such as otelcol_exporter_sent_spans with labels that matched the resource attributes of all the spans sent by the collector.
Unfortunately this didn't work, because the metrics themselves don't include resource attributes.
Is there any way for one to be able to monitor the attributes of telemetry data passing through a collector using the collector metrics?
Or is there another approach to solving this problem I haven't considered?
Any response would be greatly appreciated, thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently I have an OpenTelemetry Collector that receives telemetry data from several different (untracked) sources, and then the collector sends these out to different backends depending on whether they are traces, logs, or metrics. Those sources differentiate themselves by setting a resource attribute to a specific value, so that they can find their data in the backends.
Now I am trying to see, based on this resource attribute, how many traces, logs, and metrics, are being sent through my Collector by each source.
One way I tried to do this was to leverage the exposed prometheus metrics. I used the prometheus receiver to scrape the
otel-collector
metrics, and then used theprometheusremotewrite
exporter to push to a prometheus instance with theresource_to_telemetry_conversion
flag enabled.This idea was to use metrics such as
otelcol_exporter_sent_spans
with labels that matched the resource attributes of all the spans sent by the collector.Unfortunately this didn't work, because the metrics themselves don't include resource attributes.
Is there any way for one to be able to monitor the attributes of telemetry data passing through a collector using the collector metrics?
Or is there another approach to solving this problem I haven't considered?
Any response would be greatly appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions