open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.94k stars 2.29k forks source link

Allow routing based on span attribute in routing processor #35293

Open Christian-Schmid opened 1 week ago

Christian-Schmid commented 1 week ago

Component(s)

processor/routing

Is your feature request related to a problem? Please describe.

Our application serves at the same time multiple tenants (tenant is identified at runtime on request basis) and we want to enable clear separation of the trace data. To distinguish which span belongs to a certain tenant we add this as span attribute "tenant-name" on our spans. Currently it is not possible to use the routing processor as it does only allow routing based on resources attributes.

Describe the solution you'd like

It would be nice if the routing processor supports routing based on span attributes.

Describe alternatives you've considered

Our current work around is (as we have limit amount of tenants) to define multiple exporters locally and first duplicate the messages locally and then use the filter processor to remove the unwanted ones in our collector.

Additional context

No response

github-actions[bot] commented 1 week ago

Pinging code owners: