You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by jp...@apache.org on 2024/09/25 11:49:12 UTC

(camel) branch backport-4.4.x created (now 85550f32b97)

This is an automated email from the ASF dual-hosted git repository.

jpoth pushed a change to branch backport-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 85550f32b97 CAMEL-21261 - camel-opentelemetry: let's use the context propagators defined in the tracer

This branch includes the following new commits:

     new d65ab06c3b8 CAMEL-21261 - camel-opentelemetry: let's use the strict context storage in tests to check for leaks
     new 85550f32b97 CAMEL-21261 - camel-opentelemetry: let's use the context propagators defined in the tracer

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 02/02: CAMEL-21261 - camel-opentelemetry: let's use the context propagators defined in the tracer

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpoth pushed a commit to branch backport-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 85550f32b97f47d22cc06a84fd0657f3a6bcd6f9
Author: John Poth <po...@gmail.com>
AuthorDate: Wed Sep 25 11:51:45 2024 +0200

    CAMEL-21261 - camel-opentelemetry: let's use the context propagators defined in the tracer
    
    (cherry picked from commit 68d5b245b35e99ea08ee96ec397e4190a9800419)
---
 .../main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java b/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java
index 6858d20e819..a961116ac6e 100644
--- a/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java
+++ b/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracer.java
@@ -144,7 +144,7 @@ public class OpenTelemetryTracer extends org.apache.camel.tracing.Tracer {
             baggage = spanFromExchange.getBaggage();
         } else {
             ExtractAdapter adapter = sd.getExtractAdapter(exchange.getIn().getHeaders(), encoding);
-            Context ctx = GlobalOpenTelemetry.get().getPropagators().getTextMapPropagator().extract(Context.current(), adapter,
+            Context ctx = getContextPropagators().getTextMapPropagator().extract(Context.current(), adapter,
                     new OpenTelemetryGetter(adapter));
             Span span = Span.fromContext(ctx);
             baggage = Baggage.fromContext(ctx);
@@ -174,7 +174,7 @@ public class OpenTelemetryTracer extends org.apache.camel.tracing.Tracer {
         } else {
             ctx = Context.current().with(otelSpan);
         }
-        GlobalOpenTelemetry.get().getPropagators().getTextMapPropagator().inject(ctx, adapter, new OpenTelemetrySetter());
+        getContextPropagators().getTextMapPropagator().inject(ctx, adapter, new OpenTelemetrySetter());
     }
 
     @Override


(camel) 01/02: CAMEL-21261 - camel-opentelemetry: let's use the strict context storage in tests to check for leaks

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpoth pushed a commit to branch backport-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d65ab06c3b8e52e19c8cf246e52a651c16282805
Author: John Poth <po...@gmail.com>
AuthorDate: Wed Sep 25 11:51:58 2024 +0200

    CAMEL-21261 - camel-opentelemetry: let's use the strict context storage in tests to check for leaks
    
    (cherry picked from commit 0614ca2a862c291f08e63a855af315403fe77bb0)
---
 components/camel-opentelemetry/pom.xml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/components/camel-opentelemetry/pom.xml b/components/camel-opentelemetry/pom.xml
index 182c3bafd87..012128f744f 100644
--- a/components/camel-opentelemetry/pom.xml
+++ b/components/camel-opentelemetry/pom.xml
@@ -100,6 +100,20 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemPropertyVariables>
+                        <io.opentelemetry.context.enableStrictContext>true</io.opentelemetry.context.enableStrictContext>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
     <profiles>
         <profile>
             <id>full</id>