-
Notifications
You must be signed in to change notification settings - Fork 450
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
Add resource attributes to collector sidecar #832
Conversation
Signed-off-by: Ruben Vargas <[email protected]>
@pavolloffay What do you think? |
Co-authored-by: Ben B. <[email protected]>
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.
It looks good. It's worth modifying e2e test to check if the variable is set.
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
Signed-off-by: Ruben Vargas <[email protected]>
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 great work. The PR looks good to me.
Could you please document this behavior in readme or perhaps in the api/crd (if it makes sense)?
…mode Signed-off-by: Ruben Vargas <[email protected]>
Updated the README |
Signed-off-by: Ruben Vargas <[email protected]>
Done! |
* Add resource attributes to collector sidecar Signed-off-by: Ruben Vargas <[email protected]> * Update getAttributesEnv comments. Co-authored-by: Ben B. <[email protected]> * Use semconv package for attribute names Signed-off-by: Ruben Vargas <[email protected]> * Make env var names consistent Signed-off-by: Ruben Vargas <[email protected]> * Improve comments Signed-off-by: Ruben Vargas <[email protected]> * Rename attributes function Signed-off-by: Ruben Vargas <[email protected]> * fix import order Signed-off-by: Ruben Vargas <[email protected]> * Verify env vars on sidecar e2e test Signed-off-by: Ruben Vargas <[email protected]> * Update readme mentioning OTEL_RESOURCE_ATTRIBUTES env var on sidecar mode Signed-off-by: Ruben Vargas <[email protected]> * README Improvments Signed-off-by: Ruben Vargas <[email protected]> Co-authored-by: Ben B. <[email protected]>
This PR adds an env var
OTEL_RESOURCE_ATTRIBUTES
to the sidecar pod, this envvar contains the k8s attributes of the pod, this is to be used for example with the resource detector processor to attach k8s attributes to spans,logs and metrics.Updates #573
Signed-off-by: Ruben Vargas [email protected]