-
Notifications
You must be signed in to change notification settings - Fork 819
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
Explicit bucket boundaries advice not working with agent SDK #10017
Comments
@knbk you are only running into this because you are using osgi, right? |
@laurit No, this also happens without OSGi, just using the default class loader setup. It only works if I add
Let me see if I can push a simple reproducible example. |
I've created a small reproducible example here: https://github.com/knbk/otel-java-example-project Running |
Describe the bug
The advice API to set explicit bucket boundaries was stabilised in v1.32.0, and the
opentelemetry-api
instrumentation was updated to bridge the stable method to the agent SDK.Currently the bridging does not work when the agent is used without the SDK incubator extension. The
opentelemetry-api-1.31
instrumentation is not loaded because of a muzzle reference mismatch. As a result, the default implementation on the interface is used, which discards the advice.Steps to reproduce
Use the
opentelemetry-api
package to create a histogram, and use thesetExplicitBucketBoundariesAdvice()
method to set non-default bucket boundaries. Run the application with the java agent, but without the SDK incubator extension.Full example application is available here: https://github.com/knbk/otel-java-example-project
Expected behavior
The explicit bucket boundaries from the advice are used. In the example app, running
gradle app:run
should log thetest
metric with the explicitly configured bucket boundaries.Actual behavior
The explicit bucket boundaries are discarded by the default method implementation in the interface. The
opentelemetry-api-1.31
instrumentation fails to load when the incubator extension is not present:Javaagent or library instrumentation version
v1.32.0
Environment
JDK: Corretto 1.8
OS: Amazon Linux 2
Additional context
No response
The text was updated successfully, but these errors were encountered: