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

inject env begining with prefix "OTEL_" #706

Closed
elvis-cai opened this issue Feb 11, 2022 · 4 comments · Fixed by #709
Closed

inject env begining with prefix "OTEL_" #706

elvis-cai opened this issue Feb 11, 2022 · 4 comments · Fixed by #709
Labels
area:auto-instrumentation Issues for auto-instrumentation

Comments

@elvis-cai
Copy link
Contributor

Hi

we are using otel operator to inject splunk otel java library, and from the doc https://docs.splunk.com/observability/gdi/get-data-in/application/java/instrumentation/instrument-java-application.html#deploy-the-java-agent-in-kubernetes, we also need inject env starting with prefix SPLUNK_, and from the code https://github.com/open-telemetry/opentelemetry-operator/blob/main/apis/v1alpha1/instrumentation_webhook.go#L134 it is hardcoded to OTEL, just wondering is it possible we could inject env other than OTEL_ to make operator more generic? thanks.

@pavolloffay pavolloffay added the area:auto-instrumentation Issues for auto-instrumentation label Feb 11, 2022
@pavolloffay
Copy link
Member

The main reason that the operator uses only OTEL_ prefix is to avoid people using the instrumentation CR to configure their apps.

Which env vars would you like to inject? It seems that the SPLUNK agent supports both OTEL_ and SPLUNK_ env vars. e.g.

SPLUNK_OTEL_AGENT - address to Splunk host agent
SPLUNK_ACCESS_TOKEN - the access token

I like the idea that the operator could work with vendor distributions. In this case we could support SPLUNK prefix as well.

@elvis-cai
Copy link
Contributor Author

elvis-cai commented Feb 11, 2022

Thanks for the quick reply, here's all the envs for splunk otel java lib we could configure, https://docs.splunk.com/observability/gdi/get-data-in/application/java/configuration/advanced-java-otel-configuration.html#nav-Advanced-configuration.
The actively used ones for us are below, we might also need add SPLUNK_PROFILER_xx related in future.

  • SPLUNK_METRICS_ENABLED
  • SPLUNK_METRICS_ENDPOINT
  • SPLUNK_OTEL_AGENT

And yes SPlunk distributed java library supports all the features of the OpenTelemetry Instrumentation for Java and added extra features as the link mentioned here https://docs.splunk.com/observability/gdi/get-data-in/application/java/splunk-java-otel-distribution.html#features-of-the-splunk-distribution-of-opentelemetry-java, thay may explain it supports OTEL and SPLUNK prefix.

@pavolloffay
Copy link
Member

@elvis-cai would you like to submit a PR to fix this?

@elvis-cai
Copy link
Contributor Author

sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants