helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.52k stars 564 forks source link

even though appropriate tracer object is created and registered globally, calling io.helidon.tracing.Tracer.global() results in DefaultTracer #9486

Closed AshokVardhanM closed 1 week ago

AshokVardhanM commented 1 week ago

Even though appropriate tracer object is created and registered globally, calling io.helidon.tracing.Tracer.global() results in DefaultTracer

We have observed that OpenTelemetryProducer.java's init() method is being executed and both opentelemetry and helidon tracing tracer objects are created. Helidon tracing object is also registered globally via OpenTelemetryTracerProvider.java but when we try to call io.helidon.tracing.Tracer.global() it results in DefaultTracer object instead of appropriate tracer object.

Environment Details


Problem Description

We are getting DefaultTracer object on executing io.helidon.tracing.Tracer.global() even when appropriate tracer object is created and registered globally via OpenTelemetryTracerProvider.java

This problem is continuously happening in the application shared/attached in this ticket.

Steps to reproduce

Start the application from the main class named "StreamsLongevityMain" We can debug the flow and observe that OpenTelemetryProducer.java's init() method is executed first and then creates and registers the tracer object and then Tracer.global() results in DefaultTracer object.

AshokVardhanM commented 1 week ago

seems like attachment is more than expected size and is not getting uploaded, please let me know on how to upload the project where the issue is observed.

tjquinno commented 1 week ago

This might be the same as #9488.

tjquinno commented 1 week ago

Closing as duplicate of #9488.