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

Option to exclude certain ENV variables from auto-instrumentation #3464

Open
dkPranav opened this issue Nov 15, 2024 · 2 comments
Open

Option to exclude certain ENV variables from auto-instrumentation #3464

dkPranav opened this issue Nov 15, 2024 · 2 comments

Comments

@dkPranav
Copy link

I believe these are the default ENVs injected when instrumentation.opentelemetry.io/inject-sdk annotation is added to a PodSpec,

OTEL_NODE_IP
OTEL_POD_IP
OTEL_SERVICE_NAME 
OTEL_RESOURCE_ATTRIBUTES_POD_NAME
OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
OTEL_RESOURCE_ATTRIBUTES

I understand that we can explicitly pass these ENVs in the pod directly to override the default values. and also add an annotation to add custom attributes. But is there a way to exclude injection of them using the Intrumentation CR.

Our usecase example:
We are setting OTEL_SERVICE_NAME in the container image Dockerfile across many deployments.
We don't want the auto-instrumentation to inject this OTEL_SERVICE_NAME, so is there a way exclude injection of certain Env variables.

@dkPranav dkPranav changed the title Option to exclude certain ENV variable from auto-instrumentation Option to exclude certain ENV variables from auto-instrumentation Nov 15, 2024
@jack-berg
Copy link
Member

These environment variables aren't part of this repository. Transferring to to opentelemetry-operator, which I believe is responsible for setting these.

@jack-berg jack-berg transferred this issue from open-telemetry/opentelemetry-configuration Nov 15, 2024
@jaronoff97
Copy link
Contributor

I believe if you were to set it to be the identity i.e. OTEL_SERVICE_NAME=$OTEL_SERVICE_NAME that would propagate what you already have.

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

No branches or pull requests

3 participants