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 prefix for OTEL environment variables in the Instrumentation CR #1962

Closed
pavolloffay opened this issue Jul 26, 2023 · 7 comments
Closed
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request

Comments

@pavolloffay
Copy link
Member

The Quarkus runtime is already instrumented with OpenTelemtry, however it overrides OpenTelemtry env variables by adding QUARKUS_ prefix. Therefore the Quarkus app cannot be instrumented with the Instrumentation CR via instrumentation.opentelemetry.io/inject-sdk: "true".

https://quarkus.io/guides/opentelemetry#quarkus-opentelemetry_configuration

@pavolloffay pavolloffay added enhancement New feature or request area:auto-instrumentation Issues for auto-instrumentation labels Jul 26, 2023
@pavolloffay
Copy link
Member Author

The proposal of this ticket is to add prefix configuration for the env variables added by the operator.

@brunobat
Copy link

That would be great. Thanks @pavolloffay

@yuriolisa
Copy link
Contributor

Can I take this one?

@TylerHelmuth
Copy link
Member

@pavolloffay instead of adding a new env prefix, could we remove the constraint?

@jaronoff97 jaronoff97 added this to the v1alpha2 CRD release milestone Nov 28, 2023
@pavolloffay pavolloffay removed this from the Collector v1beta1 CRD release milestone Apr 5, 2024
@jaronoff97
Copy link
Contributor

Closed by #2768

@CaffeineDaemon
Copy link

I still struggle with using instrumentation.opentelemetry.io/inject-sdk: "true" with a quarkus app.
Sure, with the validation removed i can set all the OTEL environment variables myself with the QUARKUS_ prefix. But i am using the Instrumentation CR so i don't have to set all OTEL environment variables myself in the first place. I also can't use expansion to reference a variable like OTEL_PROPAGATORS like so:

spec:
  env:
  - name: QUARKUS_OTEL_EXPORTER_OTLP_ENDPOINT
    value: $(QUARKUS_OTEL_EXPORTER_OTLP_ENDPOINT)
  - name: QUARKUS_OTEL_PROPAGATORS
    value: $(OTEL_PROPAGATORS)

The variables are not expanded. Am i doing something wrong?

@jaronoff97
Copy link
Contributor

@CaffeineDaemon it may be best to open a new issue and we can debug from there if you don't mind :)

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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants