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

Support OTEL_RESOURCE_ATTRIBUTES in the proxy #3580

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Conversation

sfleen
Copy link
Collaborator

@sfleen sfleen commented Jan 29, 2025

This environment variable is definted by the OpenTelemetry conventions as a way of specifying additional resource attributes to be included in traces: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration

Note that this is parallel to LINKERD2_PROXY_TRACE_EXTRA_ATTRIBUTES, which is meant for common attributes that should always be provided by the proxy (pod UID, contianer name, etc.). We do not expect users to override that one, as OTEL_RESOURCE_ATTRIBUTES is the conventional way of specifying custom attributes.

Based on #3483

This allows us to include arbitrary values from the k8s downward API beyond just the pod labels that are included in the trace attributes file.

See linkerd/linkerd2#13544 for the corresponding control plane change.

Signed-off-by: Scott Fleener <[email protected]>
This environment variable is definted by the OpenTelemetry conventions as a way of specifying additional resource attributes to be included in traces: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration

Note that this is parallel to LINKERD2_PROXY_TRACE_EXTRA_ATTRIBUTES, which is meant for common attributes that should always be provided by the proxy (pod UID, contianer name, etc.). We do not expect users to override that one, as OTEL_RESOURCE_ATTRIBUTES is the conventional way of specifying custom attributes.

Signed-off-by: Scott Fleener <[email protected]>
@sfleen sfleen requested a review from a team as a code owner January 29, 2025 17:02
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 66.77%. Comparing base (96124bc) to head (aa1a3dd).
Report is 772 commits behind head on main.

Files with missing lines Patch % Lines
linkerd/app/src/env.rs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3580      +/-   ##
==========================================
- Coverage   67.68%   66.77%   -0.91%     
==========================================
  Files         332      391      +59     
  Lines       15158    18406    +3248     
==========================================
+ Hits        10259    12291    +2032     
- Misses       4899     6115    +1216     
Files with missing lines Coverage Δ
linkerd/app/src/env.rs 52.47% <25.00%> (-6.93%) ⬇️

... and 171 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63dce67...aa1a3dd. Read the comment docs.

@sfleen sfleen enabled auto-merge (squash) January 31, 2025 14:42
@sfleen sfleen merged commit 4e791fe into linkerd:main Jan 31, 2025
15 checks passed
@sfleen sfleen deleted the otel_attr branch January 31, 2025 15:47
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 this pull request may close these issues.

2 participants