-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to specify resource label as 'from_attribute' in routingprocessor #3746
Comments
…interesting (#3746) - added http client and server to make the traces more interesting and not single span. - simplified the demo by removing the traces and metrics load generators and the OTel-agent. - updated the libraries and the code to use the latest OTEL APIs
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 |
@maxsivkov The routing processor is able to do that with both conventional configuration and OTTL statements, see Readme. @jpkrohling can you please close the issue? |
processors:
routing:
default_exporters: [elasticsearch/default]
table:
- statement: route() where (resource.attributes["k8s.namespace.name"] == "infra" && resource.attributes["k8s.container.name"] != "access-logs") || resource.attributes["k8s.namespace.name"] == "flux-system"
exporters: [elasticsearch/infra]
- statement: route() where resource.attributes["k8s.namespace.name"] == "infra" && resource.attributes["k8s.container.name"] == "access-logs"
exporters: [elasticsearch/ingress]
- statement: route() where resource.attributes["k8s.namespace.name"] == "staging" && resource.attributes["k8s.container.name"] == "app"
exporters: [elasticsearch/apps] Logs:
@kovrus / @jpkrohling looks like OTTL in routing doesn't work without upd: created a new issue for this |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Currently from_attribute can reference http header only. Allowing to specify resource label (from the ResourceSpansSlice struct) as from_attribute allows to route traces based on attributes gathered earlier. For example to route trace to specific exporter based on a pod name (gathered by k8sprocessor)
Describe alternatives you've considered
Cannot find out any
Additional context
Each resource should be processed individually based on a resource's attribute value.
In this case batching will not work.
may be we need to introduce additional parameter like attribute_source with values FromHeader and FromResource.
Currently I am studying opentelemetry, so I may be wrong with terminology.
with 'resource attributes' I mean attribute from the following map
https://github.com/open-telemetry/opentelemetry-collector/blob/c71f5bbe77492603f52a19a857d5db3de3bce2d3/consumer/pdata/generated_resource.go#L47
The text was updated successfully, but these errors were encountered: