You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/10/16 06:27:44 UTC
[camel] 01/02: CAMEL-19968: The Tracing Strategy is failing when using pollEnrich (#11727)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.0.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 11b66c2f2d63bbf566ad6d6347af2064def74327
Author: Rhuan Rocha <rh...@gmail.com>
AuthorDate: Mon Oct 16 03:22:15 2023 -0300
CAMEL-19968: The Tracing Strategy is failing when using pollEnrich (#11727)
* CAMEL-19968: The Tracing Strategy is failing when using pollEnrich with seda endpoint
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
* CAMEL-19968: The Tracing Strategy is failing when using pollEnrich with seda endpoint
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---------
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---
.../resources/org/apache/camel/catalog/schemas/camel-spring.xsd | 2 +-
.../apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 0b662159251..bb6822e416d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -439,7 +439,7 @@ Enriches a message with data from a secondary resource
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Camel error handling.
+Error handler settings
]]>
</xs:documentation>
</xs:annotation>
diff --git a/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java b/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java
index 7e2266bf3ae..da3b3c854a7 100644
--- a/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java
+++ b/components/camel-opentelemetry/src/main/java/org/apache/camel/opentelemetry/OpenTelemetryTracingStrategy.java
@@ -48,8 +48,12 @@ public class OpenTelemetryTracingStrategy implements InterceptStrategy {
}
return new DelegateAsyncProcessor((Exchange exchange) -> {
+ Span span = null;
OpenTelemetrySpanAdapter spanWrapper = (OpenTelemetrySpanAdapter) ActiveSpanManager.getSpan(exchange);
- Span span = spanWrapper.getOpenTelemetrySpan();
+ if (spanWrapper != null) {
+ span = spanWrapper.getOpenTelemetrySpan();
+ }
+
if (span == null) {
target.process(exchange);
return;