grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.49k stars 224 forks source link

Add agent level tags to telemetry spans - Flow Mode #445

Open nonamef opened 1 year ago

nonamef commented 1 year ago

Request

Add agent level tags to telemetry spans. The function would just need to append the defined tags to outgoing spans. Same functionality is used by Jaeger agents https://www.jaegertracing.io/docs/1.45/deployment/#agent-level-tags.

Use case

When running multiple Kubernetes clusters, separating spans based on tags is necessary. Without them, there is no way to seperate same service spans across multiple clusters. Example tags are environment=uat, account=xxx

rfratto commented 1 year ago

I'm trying to identify where the best place to configure and apply these would be.

Add agent level tags to telemetry spans.

Are you talking about just spans that the agent generates itself, or all spans, including spams received from the network (e.g., via otelcol.receiver.otlp)?

nonamef commented 1 year ago

I was thinking agent level as it would be same functionality as the Jaeger agent, though I can see that some others might find it useful for network spans.

ptodev commented 1 year ago

If all that's needed is to add span-level attributes, then this could be achieved already via otelcol.processor.attributes?