Skip to content

otel: add option to disable telemetry SDK resource attributes#44689

Open
fcfort wants to merge 3 commits intoenvoyproxy:mainfrom
fcfort:otelsdk
Open

otel: add option to disable telemetry SDK resource attributes#44689
fcfort wants to merge 3 commits intoenvoyproxy:mainfrom
fcfort:otelsdk

Conversation

@fcfort
Copy link
Copy Markdown
Contributor

@fcfort fcfort commented Apr 27, 2026

Commit Message: otel: add option to disable telemetry SDK resource attributes

Additional Description:

Currently, the OpenTelemetry tracer always populates telemetry SDK attributes (telemetry.sdk.language, telemetry.sdk.name, telemetry.sdk.version).

We have a customer-facing user interface for viewing traces and we don't want to leak internal Envoy details of our product.

This PR introduces a new configuration option set_telemetry_sdk_resource_attributes (default true) in OpenTelemetryConfig to allow opting-out of populating these attributes. When set to false, the attributes listed above will be omitted from the resource spans.

The new behavior (omitting attributes) is default off to preserve backward compatibility.

Risk Level: Low

Testing:

  • Unit tests in test/extensions/tracers/opentelemetry/resource_detectors/resource_provider_test.cc have been updated and a new test added to validate that attributes are omitted when disabled.
  • Unit tests in test/extensions/tracers/opentelemetry/opentelemetry_tracer_impl_test.cc have been updated to verify the configuration flag is passed correctly.

Docs Changes: None.
Release Notes: Added a configuration option to disable populating telemetry SDK attributes in the OpenTelemetry tracer.
Platform Specific Features: None.
Runtime guard: None.

[Disclosed usage of generative AI: Yes, used to assist in code modifications.]

Signed-off-by: Frank Fort <ffort@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @adisuissa
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #44689 was opened by fcfort.

see: more, trace.

Signed-off-by: Frank Fort <ffort@google.com>
@fcfort fcfort requested a review from mattklein123 as a code owner April 27, 2026 19:42
Signed-off-by: Frank Fort <ffort@google.com>
@fcfort
Copy link
Copy Markdown
Contributor Author

fcfort commented Apr 28, 2026

/retest due to errors downloading packages in CI

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm api

Assigning @yanavlasov as codeowner
/assign @yanavlasov

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.

3 participants