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 for OTEL Synchronous Gauge #637

Closed
timronan opened this issue Dec 8, 2023 · 2 comments
Closed

Support for OTEL Synchronous Gauge #637

timronan opened this issue Dec 8, 2023 · 2 comments
Labels
enhancement New feature or request stale

Comments

@timronan
Copy link

timronan commented Dec 8, 2023

Describe the bug
io.opentelemetry.extension.incubator.metrics.ExtendedDoubleGaugeBuilder does not seem to be supported by aws-otel-java-instrumentation because I cannot cast io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_10.metrics.ApplicationDoubleGaugeBuilder to io.opentelemetry.extension.incubator.metrics.ExtendedDoubleGaugeBuilder following the example below and outlined in the and Add experimental synchronous gauge pull request.

Steps to reproduce

In my Dockerfile, I download the aws-opentelemetry-agent v1.31.0 by running:

ADD https://github.com/aws-observability/aws-otel-java-instrumentation/releases/download/v1.31.0/aws-opentelemetry-agent.jar /app/aws-opentelemetry-agent.jar

In my Observability class, I try to build and test a synchronous Gauge by running:

DoubleGauge gauge = ((ExtendedDoubleGaugeBuilder) meter.gaugeBuilder("my-gauge")).build();
gauge.set(1.0);

What did you expect to see?
I expect to see a metric named "my-gauge" that contains a double with a value of 1.0 passed to my Prometheus instance.

What did you see instead?

Exception in thread "main" java.lang.ClassCastException: class
io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_10.metrics.ApplicationDoubleGaugeBuilder cannot be
cast to class io.opentelemetry.extension.incubator.metrics.ExtendedDoubleGaugeBuilder
(io.opentelemetry.javaagent.instrumentation.opentelemetryapi.v1_10.metrics.ApplicationDoubleGaugeBuilder and
io.opentelemetry.extension.incubator.metrics.ExtendedDoubleGaugeBuilder are in unnamed module of loader 'app')

Additional context
Any help you could provide would be greatly appreciated; thanks in advance.

@vsakaram vsakaram added the enhancement New feature or request label Dec 11, 2023
Copy link

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

@github-actions github-actions bot added the stale label Mar 10, 2024
Copy link

This issue was closed because it has been marked as stale for 30 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants