-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[extension/header_setter] Expose auth attributes #38441
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
[extension/header_setter] Expose auth attributes #38441
Conversation
extension/headerssetterextension/internal/source/attribute_test.go
Outdated
Show resolved
Hide resolved
Please add a changelog |
Allow settings header values based on authentication attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes my summary review. Codeowners please review.
@VihasMakwana please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@atoulme it's good to go now. |
Hi. I have question on this change. I thought it resolves #34257 but seems it is not related. Do I understand it correctly? Actually I wanted to set header from attributes so tested dev environment with 0.122.0 docker image, and it was failed. otelcol get panic and restarted ![]() I added tenant id from otelcol A attributes:
actions:
- action: insert
key: tenant_id
value: "attribute_tenant" and tried to set header from this in otelcol B headers_setter:
headers:
- action: insert
key: X-Scope-OrgID
from_attribute: tenant_id
default_value: unknown And it didn't work. |
Authorization attributes and metric/trace attributes are unfortunately not the same, and are very confusingly named. I had to dig through the source code to understand it. |
Is there a way to make this work with a batchprocessor in the pipeline? From what I see in the code for batchprocessor it only preserves metadata from the ctx Info object's Metadata map, not the Auth map. |
Description
Allow settings header values based on authentication attributes
Testing
Documentation
Update extension README to explain
from_attribute