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:46:23 UTC
(camel) branch backport-4.8.x created (now 2beda24c301)
This is an automated email from the ASF dual-hosted git repository.
jpoth pushed a change to branch backport-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git
at 2beda24c301 CAMEL-21261 - camel-opentelemetry: let's use the context propagators defined in the tracer
This branch includes the following new commits:
new cfad2f31354 CAMEL-21261 - camel-opentelemetry: let's use the strict context storage in tests to check for leaks
new 2beda24c301 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.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2beda24c301d76080cf67c642144d2040d84d9bb
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 8df31fe3329..cdf98014a3e 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
@@ -164,7 +164,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);
@@ -192,7 +192,7 @@ public class OpenTelemetryTracer extends org.apache.camel.tracing.Tracer {
if (spanFromExchange.getBaggage() != null) {
ctx = ctx.with(spanFromExchange.getBaggage());
}
- 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.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit cfad2f31354bd8b565ff3daf9ab9a8abffdf043b
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 ab4c52219ad..2b37d60c821 100644
--- a/components/camel-opentelemetry/pom.xml
+++ b/components/camel-opentelemetry/pom.xml
@@ -112,6 +112,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>