-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
OTEL resources attributes with interpolation doesn't get set #40968
Comments
/cc @radcortez @brunobat |
/cc @brunobat (opentelemetry,tracing), @radcortez (opentelemetry,tracing) |
Although it's not solution to the problem, I really think the way |
@geoand how so? The way that I see is that Quarkus is trying to do the same thing as autoconfigure, as you can pass as an env variable, so it is runtime evaluated, you can have multiple resources implementing the SPI so all resources get merged into one single resource (https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#opentelemetry-resource). The difference is that in Quarkus you can also do that using cdi beans, which get merged into one resource as well. |
Forcing users to use |
Yes, this was to keep the same expected value format used by OTel, so we only need to rewrite the configuration names to pass the configuration back to OTel. Ideally, our own Quarkus OTel configuration should follow our best practices. In this case, we need a conversion layer to convert our configuration values to the expected format of OTel. We could go ahead and revisit this discussion. |
I agree with @radcortez this way we isolate users from potencial OTel side changes. |
The only thing is that this issue isn't about how we inform the resource attributes 😆 but rather an interpolation/substitution issue 😊 |
If I do pass |
This are in OTel extension hasn't changed since 3.8.0 was released. |
Yeah, the only thing is that it is being evaluated/recorded during build time, seems to be triggering the fallback config source interceptor, relocating it to the old |
This broke with #39308, when we changed how relocates and fallbacks work. We could fix it with a change to the relocation / fallback interceptor, but I think it is time to remove them completely. |
I Agree @radcortez. We need to remove these old properties. Created this: #41409 |
Describe the bug
OTEL resources attributes with interpolation doesn't get set.
Whenever we use an interpolation for something that doesn't resolve right the
quarkus.otel.resource.attributes
is not taken into accountExpected behavior
Properties that are runtime get evaluated during runtime, and
quarkus.otel.resource.attributes
gets setActual behavior
We see a warning:
And property is not set
How to Reproduce?
Clone https://github.com/quarkusio/quarkus-quickstarts/blob/3.11/opentelemetry-quickstart/pom.xml OTEL Quick start and add this to the properties:
with that build natively and you will get:
run it with:
you can take a look at Jaeger and there won't be the custom resource attributes
....
If you checkout the 3.8.x quickstart
You won't see the warning log and it will work as expected
So it works up until 3.8.4... any Quarkus after that it doesn't work =]
Output of
uname -a
orver
Darwin C02C32WQMD6R 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Liberica-NIK-23.1.3-1 (build 21.0.3+10-LTS) OpenJDK 64-Bit Server VM Liberica-NIK-23.1.3-1 (build 21.0.3+10-LTS, mixed mode, sharing)
Quarkus version or git rev
3.11.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /usr/local/Cellar/maven/3.9.5/libexec Java version: 21.0.2, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-community-openjdk-21.0.2+13.1/Contents/Home Default locale: en_CA, platform encoding: UTF-8 OS name: "mac os x", version: "14.2.1", arch: "x86_64", family: "mac"
Additional information
No response
The text was updated successfully, but these errors were encountered: