Skip to content
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

routingprocessor: use resource attributes instead of context #5538

Closed
andrzej-stencel opened this issue Sep 30, 2021 · 0 comments · Fixed by #5694
Closed

routingprocessor: use resource attributes instead of context #5538

andrzej-stencel opened this issue Sep 30, 2021 · 0 comments · Fixed by #5694

Comments

@andrzej-stencel
Copy link
Member

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

Hi everyone,

I would like to use the routingprocessor to route my records to different exporters based on a resource attribute value.
Currently, the routingprocessor uses context to find the attribute.

Describe the solution you'd like

I'd like to add a new configuration option like attribute_source, which could be set to context or resource and would default to context to keep backwards compatibility. If set to resource, the processor would look for the attribute specified in from_attribute not in the context, but in resource attributes.

At the same time, I'd like to extend the scope of the processor from traces only to logs and metrics as well (this could be a separate pull request if that makes sense).

Describe alternatives you've considered

I don't really see any alternative.

Additional context

Not much

tigrannajaryan pushed a commit that referenced this issue Oct 15, 2021
**Description:** Add a feature to `routingprocessor` to route traces on resource attributes and make it configurable (retaining previous default to read from context).

**Link to tracking Issue:** Fixes #5538

**Testing:** Added unit tests.

**Documentation:** Changed README.

---

Huge shout-out to @astencel-sumo for this patch! 🙇
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant