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

ApplicationDoubleHistogramBuilder bucket boundaries via setExplicitBucketBoundariesAdvice #9872

Closed
nluk opened this issue Nov 15, 2023 · 1 comment · Fixed by #9884
Closed
Assignees
Labels
bug Something isn't working

Comments

@nluk
Copy link

nluk commented Nov 15, 2023

Describe the bug

Crated by request.

The histogram builders provided by agent autoinstrumentation do not support setting explicit bucket boundaries. That is io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_10.metrics.ApplicationDoubleHistogramBuilder does not implement io.opentelemetry.extension.incubator.metrics.ExtendedDoubleHistogramBuilder or any similiar interface.

Steps to reproduce

var builder = GlobalOpenTelemetry.get()
    .getMeter("test_meter")
    .histogramBuilder("test_histogram");
if (builder instanceof io.opentelemetry.extension.incubator.metrics.ExtendedDoubleHistogramBuilder extendedBuilder) {
    extendedBuilder.setExplicitBucketBoundariesAdvice(List.of(1.0, 100.0));
}

Expected behavior

It is possible to set explicit bucket bounderies when running with only java agent.

Actual behavior

When run with opentelemetry-sdk or opentelemetry-sdk-testing the explicit boundaries are set. With opentelemetry-javaagent only default boundaries apply.

Javaagent or library instrumentation version

1.31.0

Environment

JDK: OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OS: Ubuntu 22.04.3 LTS (Jammy Jellyfish)

Additional context

No response

@nluk nluk added bug Something isn't working needs triage New issue that requires triage labels Nov 15, 2023
@mateuszrzeszutek
Copy link
Member

Hey @nluk ,

Thanks for filing this, this is most definitely a bug.

@mateuszrzeszutek mateuszrzeszutek added needs author feedback Waiting for additional feedback from the author and removed needs triage New issue that requires triage needs author feedback Waiting for additional feedback from the author labels Nov 15, 2023
@laurit laurit self-assigned this Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants