open-telemetry / opentelemetry-collector-contrib

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

Allow routing based on span attribute in routing processor #35293

Open Christian-Schmid opened 2 months ago

Christian-Schmid commented 2 months 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 2 months ago

Pinging code owners:

github-actions[bot] commented 1 week ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.