You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "bvahdat (via GitHub)" <gi...@apache.org> on 2023/02/15 15:11:43 UTC

[GitHub] [camel] bvahdat commented on a diff in pull request #9341: Avoid using the GlobalOpenTelemetry.get() and allow for injection of …

bvahdat commented on code in PR #9341:
URL: https://github.com/apache/camel/pull/9341#discussion_r1104751912


##########
components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java:
##########
@@ -86,6 +96,23 @@ protected void initTracer() {
             // No tracer is available, so setup NoopTracer
             tracer = OpenTelemetry.noop().getTracer(instrumentationName);
         }
+
+        if (contextPropagators == null) {

Review Comment:
   Inside the very same method here, namely `initTracer()` you do initialise both `io.opentelemetry.api.trace.Tracer` as well as `io.opentelemetry.context.propagation.ContextPropagators`. Ideally we should add an abstract method as `initContextPropagators()` to `org.apache.camel.tracing.Tracer`, similar to `initTracer()`, and then call it on the right spot, namely in `Tracer#doInit()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org