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/08/26 13:17:48 UTC
(camel) branch otel-close-span created (now e7a1afadd34)
This is an automated email from the ASF dual-hosted git repository.
jpoth pushed a change to branch otel-close-span
in repository https://gitbox.apache.org/repos/asf/camel.git
at e7a1afadd34 Otel close scope only once
This branch includes the following new commits:
new e7a1afadd34 Otel close scope only once
The 1 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) 01/01: Otel close scope only once
Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jpoth pushed a commit to branch otel-close-span
in repository https://gitbox.apache.org/repos/asf/camel.git
commit e7a1afadd34c66321ffbaa7e1855f2105ecdcc9d
Author: John Poth <po...@gmail.com>
AuthorDate: Mon Aug 26 15:17:49 2024 +0200
Otel close scope only once
---
.../src/main/java/org/apache/camel/tracing/ActiveSpanManager.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/camel-tracing/src/main/java/org/apache/camel/tracing/ActiveSpanManager.java b/components/camel-tracing/src/main/java/org/apache/camel/tracing/ActiveSpanManager.java
index 92dc551619f..293151c767f 100644
--- a/components/camel-tracing/src/main/java/org/apache/camel/tracing/ActiveSpanManager.java
+++ b/components/camel-tracing/src/main/java/org/apache/camel/tracing/ActiveSpanManager.java
@@ -76,8 +76,9 @@ public final class ActiveSpanManager {
if (holder != null) {
Holder parent = holder.getParent();
exchange.setProperty(ExchangePropertyKey.ACTIVE_SPAN, parent);
-
- holder.closeScope();
+ if (!holder.isClosed()) {
+ holder.closeScope();
+ }
if (Boolean.TRUE.equals(exchange.getContext().isUseMDCLogging())) {
if (parent != null) {
SpanAdapter span = parent.getSpan();