-
Notifications
You must be signed in to change notification settings - Fork 19
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
Startup fails when also using Open Telemetry extension #335
Comments
This seems to be a related issue in the underlying Azure SDK for Java: Azure/azure-sdk-for-java#42861 |
FYI @Kitt3120 - similar to your workaround by setting Added the following dependencies into
Added the following configurations into
|
I'll try that as soon as I can, thank you :) Edit: You're right, it works without the Thank you! :) |
Hey everyone,
Context
I have an existing Quarkus application and want to add the ability to resolve Azure Keyvault variables through the Azure Services extension to the project. However, when following the guide at https://docs.quarkiverse.io/quarkus-azure-services/dev/quarkus-azure-key-vault.html, the application crashes at startup.
To be more specific, I do not inject a SecretClient. Instead, I want to use the resolution of Keyvault variables right in the application.properties file using the special ${kv//} syntax. I inject a config property using the @ConfigProperty annotation in our code, just like usually done for config properties. As soon as the variable is used at runtime, dependency injection kicks in, starts resolving the variable, and initializes the Azure Keyvault client. This is where the error happens.
Error
The error in question is the following:
Somehow, my application tries to initialize OpenTelemtry multiple times.
I attached the full log below, but from my understanding, this is the important part:
My guess is that somewhere in createFallbackTracer, initialization of OpenTelemetry is triggered, even though it was already initialized. Reading the logs, I can see that Quarkus' autoconfigure feature is used here. I don't know if the error is in the way Azure Services uses the autoconfigure feature, or Open Telemetrie's implementation of an autoconfigure provider, or even within Quarkus itself.
The workaround
I ended up reading the Quarkus Open Telemetry docs (https://quarkus.io/guides/opentelemetry) again and stumbled upon the config property
quarkus.otel.sdk.disabled
. Setting this totrue
disabled usage of the Open Telemetry SDK at runtime, and thus it is not used when the Keyvault client does it's autoconfiguring, preventing the error.I don't know what side effects this causes, but I didn't notice any so far.
Dependencies used
gradle.properties
build.gradle
Full log
The text was updated successfully, but these errors were encountered: