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/01/12 13:59:51 UTC
[camel] branch main updated (c4b1da70d31 -> e3a7fc13c64)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from c4b1da70d31 CAMEL-18901: Remove camel-spark in v4
new 611e948271e CAMEL-18899: Remove camel-opentracing in v4
new e3a7fc13c64 CAMEL-18899: Remove camel-opentracing in v4
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.
Summary of changes:
bom/camel-bom/pom.xml | 10 +-
camel-dependencies/pom.xml | 2 -
catalog/camel-allcomponents/pom.xml | 5 -
.../org/apache/camel/catalog/others.properties | 1 -
.../apache/camel/catalog/others/opentracing.json | 15 --
components/camel-opentracing/pom.xml | 148 ---------------
.../services/org/apache/camel/other.properties | 7 -
.../src/generated/resources/opentracing.json | 15 --
.../src/main/docs/opentracing.adoc | 145 ---------------
.../camel/opentracing/GetBaggageProcessor.java | 119 ------------
.../camel/opentracing/NoopTracingStrategy.java | 35 ----
.../opentracing/OpenTracingExtractAdapter.java | 41 -----
.../opentracing/OpenTracingInjectAdapter.java | 41 -----
.../camel/opentracing/OpenTracingSpanAdapter.java | 104 -----------
.../camel/opentracing/OpenTracingTracer.java | 153 ----------------
.../opentracing/OpenTracingTracingStrategy.java | 120 ------------
.../camel/opentracing/SetBaggageProcessor.java | 120 ------------
.../org/apache/camel/opentracing/TagProcessor.java | 122 -------------
.../org.apache.camel.tracing.SpanDecorator | 53 ------
.../org/apache/camel/opentracing/ABCRouteTest.java | 70 -------
.../opentracing/CamelOpenTracingTestSupport.java | 202 ---------------------
.../opentracing/ClientRecipientListRouteTest.java | 66 -------
.../opentracing/CustomComponentNameRouteTest.java | 72 --------
.../opentracing/EIPTracingActiveSpanTest.java | 81 ---------
.../camel/opentracing/EIPTracingRouteTest.java | 97 ----------
.../apache/camel/opentracing/MDCSupportTest.java | 72 --------
.../opentracing/MulticastParallelRouteTest.java | 70 -------
.../camel/opentracing/MulticastRouteTest.java | 71 --------
.../OpentracingSpanCollectorInRegistryTest.java | 57 ------
.../camel/opentracing/RouteConcurrentTest.java | 80 --------
.../camel/opentracing/SpanProcessorsTest.java | 84 ---------
.../org/apache/camel/opentracing/SpanTestData.java | 106 -----------
.../SpringOpenTracingSimpleRouteTest.java | 53 ------
.../camel/opentracing/TestSEDASpanDecorator.java | 38 ----
.../opentracing/ThirdPartyInstrumentationIT.java | 137 --------------
.../TracingClientRecipientListRouteTest.java | 85 ---------
.../TracingMulticastParallelRouteTest.java | 98 ----------
.../apache/camel/opentracing/TwoServiceTest.java | 58 ------
.../opentracing/TwoServiceWithExcludeTest.java | 64 -------
.../agent/InstallOpenTracingTracerRuleTest.java | 93 ----------
.../opentracing/integration/InterprocessIT.java | 89 ---------
.../src/test/resources/log4j2.properties | 29 ---
.../opentracing/OpenTracingSimpleRouteTest.xml | 52 ------
.../camel-tracing/src/main/docs/tracing.adoc | 2 +-
components/pom.xml | 1 -
.../services/org/apache/camel/model.properties | 1 -
docs/components/modules/others/nav.adoc | 1 -
parent/pom.xml | 7 -
48 files changed, 6 insertions(+), 3186 deletions(-)
delete mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/opentracing.json
delete mode 100644 components/camel-opentracing/pom.xml
delete mode 100644 components/camel-opentracing/src/generated/resources/META-INF/services/org/apache/camel/other.properties
delete mode 100644 components/camel-opentracing/src/generated/resources/opentracing.json
delete mode 100644 components/camel-opentracing/src/main/docs/opentracing.adoc
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/GetBaggageProcessor.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/NoopTracingStrategy.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingExtractAdapter.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingInjectAdapter.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingSpanAdapter.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracer.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracingStrategy.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/SetBaggageProcessor.java
delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/TagProcessor.java
delete mode 100644 components/camel-opentracing/src/main/resources/META-INF/services/org.apache.camel.tracing.SpanDecorator
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ABCRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CamelOpenTracingTestSupport.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ClientRecipientListRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CustomComponentNameRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingActiveSpanTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MDCSupportTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastParallelRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/OpentracingSpanCollectorInRegistryTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/RouteConcurrentTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanProcessorsTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanTestData.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpringOpenTracingSimpleRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TestSEDASpanDecorator.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ThirdPartyInstrumentationIT.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingClientRecipientListRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingMulticastParallelRouteTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceWithExcludeTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java
delete mode 100644 components/camel-opentracing/src/test/java/org/apache/camel/opentracing/integration/InterprocessIT.java
delete mode 100644 components/camel-opentracing/src/test/resources/log4j2.properties
delete mode 100644 components/camel-opentracing/src/test/resources/org/apache/camel/opentracing/OpenTracingSimpleRouteTest.xml
[camel] 02/02: CAMEL-18899: Remove camel-opentracing in v4
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit e3a7fc13c6449184301d37d091ca9cfea4425ea2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 12 14:59:35 2023 +0100
CAMEL-18899: Remove camel-opentracing in v4
---
bom/camel-bom/pom.xml | 5 ++
.../org/apache/camel/catalog/others.properties | 56 ++++++++++++++++++++++
.../services/org/apache/camel/model.properties | 1 -
3 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 7cb405ddadd..cf3b8f15d71 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1886,6 +1886,11 @@
<artifactId>camel-telegram</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-junit5</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
new file mode 100644
index 00000000000..1b55e098314
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -0,0 +1,56 @@
+attachments
+aws-xray
+cli-connector
+cloud
+cloudevents
+cluster
+componentdsl
+console
+csimple-joor
+debug
+dsl-modeline
+dsl-support
+elytron
+endpointdsl
+groovy-dsl
+headersmap
+health
+jasypt
+java-joor-dsl
+jfr
+js-dsl
+jsh-dsl
+jta
+kamelet-main
+leveldb
+lra
+mail-microsoft-oauth
+main
+management
+microprofile-config
+microprofile-fault-tolerance
+microprofile-health
+openapi-java
+opentelemetry
+platform-http-vertx
+reactive-executor-tomcat
+reactive-executor-vertx
+reactor
+redis
+resilience4j
+resourceresolver-github
+rxjava
+shiro
+spring-main
+spring-security
+spring-xml
+test-junit5
+test-main-junit5
+test-spring-junit5
+threadpoolfactory-vertx
+tracing
+undertow-spring-security
+wal
+xml-io-dsl
+xml-jaxb-dsl
+yaml-dsl
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
index d6fe889aad1..28f24db97e3 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
+++ b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
@@ -220,7 +220,6 @@ wireTap
xmlSecurity
xpath
xquery
-xstream
xtokenize
yaml
zipDeflater
[camel] 01/02: CAMEL-18899: Remove camel-opentracing in v4
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 611e948271eaefb3c7828116a1768fe0b6f1d2d1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jan 12 14:44:05 2023 +0100
CAMEL-18899: Remove camel-opentracing in v4
---
bom/camel-bom/pom.xml | 5 -
camel-dependencies/pom.xml | 2 -
catalog/camel-allcomponents/pom.xml | 5 -
.../org/apache/camel/catalog/others.properties | 57 ------
.../apache/camel/catalog/others/opentracing.json | 15 --
components/camel-opentracing/pom.xml | 148 ---------------
.../services/org/apache/camel/other.properties | 7 -
.../src/generated/resources/opentracing.json | 15 --
.../src/main/docs/opentracing.adoc | 145 ---------------
.../camel/opentracing/GetBaggageProcessor.java | 119 ------------
.../camel/opentracing/NoopTracingStrategy.java | 35 ----
.../opentracing/OpenTracingExtractAdapter.java | 41 -----
.../opentracing/OpenTracingInjectAdapter.java | 41 -----
.../camel/opentracing/OpenTracingSpanAdapter.java | 104 -----------
.../camel/opentracing/OpenTracingTracer.java | 153 ----------------
.../opentracing/OpenTracingTracingStrategy.java | 120 ------------
.../camel/opentracing/SetBaggageProcessor.java | 120 ------------
.../org/apache/camel/opentracing/TagProcessor.java | 122 -------------
.../org.apache.camel.tracing.SpanDecorator | 53 ------
.../org/apache/camel/opentracing/ABCRouteTest.java | 70 -------
.../opentracing/CamelOpenTracingTestSupport.java | 202 ---------------------
.../opentracing/ClientRecipientListRouteTest.java | 66 -------
.../opentracing/CustomComponentNameRouteTest.java | 72 --------
.../opentracing/EIPTracingActiveSpanTest.java | 81 ---------
.../camel/opentracing/EIPTracingRouteTest.java | 97 ----------
.../apache/camel/opentracing/MDCSupportTest.java | 72 --------
.../opentracing/MulticastParallelRouteTest.java | 70 -------
.../camel/opentracing/MulticastRouteTest.java | 71 --------
.../OpentracingSpanCollectorInRegistryTest.java | 57 ------
.../camel/opentracing/RouteConcurrentTest.java | 80 --------
.../camel/opentracing/SpanProcessorsTest.java | 84 ---------
.../org/apache/camel/opentracing/SpanTestData.java | 106 -----------
.../SpringOpenTracingSimpleRouteTest.java | 53 ------
.../camel/opentracing/TestSEDASpanDecorator.java | 38 ----
.../opentracing/ThirdPartyInstrumentationIT.java | 137 --------------
.../TracingClientRecipientListRouteTest.java | 85 ---------
.../TracingMulticastParallelRouteTest.java | 98 ----------
.../apache/camel/opentracing/TwoServiceTest.java | 58 ------
.../opentracing/TwoServiceWithExcludeTest.java | 64 -------
.../agent/InstallOpenTracingTracerRuleTest.java | 93 ----------
.../opentracing/integration/InterprocessIT.java | 89 ---------
.../src/test/resources/log4j2.properties | 29 ---
.../opentracing/OpenTracingSimpleRouteTest.xml | 52 ------
.../camel-tracing/src/main/docs/tracing.adoc | 2 +-
components/pom.xml | 1 -
docs/components/modules/others/nav.adoc | 1 -
parent/pom.xml | 7 -
47 files changed, 1 insertion(+), 3241 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 59054e91b79..7cb405ddadd 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1496,11 +1496,6 @@
<artifactId>camel-opentelemetry</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-opentracing</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-optaplanner</artifactId>
diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 282e9e3d702..e1908661810 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -426,8 +426,6 @@
<openstack4j-version>3.10</openstack4j-version>
<opentelemetry-version>1.21.0</opentelemetry-version>
<opentelemetry-alpha-version>${opentelemetry-version}-alpha</opentelemetry-alpha-version>
- <opentracing-version>0.33.0</opentracing-version>
- <opentracing-tracerresolver-version>0.1.8</opentracing-tracerresolver-version>
<optaplanner-version>8.32.0.Final</optaplanner-version>
<os-maven-plugin-version>1.7.0</os-maven-plugin-version>
<paho-version>1.2.5</paho-version>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 501ac0dd948..0c879cb2370 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -1293,11 +1293,6 @@
<artifactId>camel-opentelemetry</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-opentracing</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-optaplanner</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
deleted file mode 100644
index 3a31b03514c..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ /dev/null
@@ -1,57 +0,0 @@
-attachments
-aws-xray
-cli-connector
-cloud
-cloudevents
-cluster
-componentdsl
-console
-csimple-joor
-debug
-dsl-modeline
-dsl-support
-elytron
-endpointdsl
-groovy-dsl
-headersmap
-health
-jasypt
-java-joor-dsl
-jfr
-js-dsl
-jsh-dsl
-jta
-kamelet-main
-leveldb
-lra
-mail-microsoft-oauth
-main
-management
-microprofile-config
-microprofile-fault-tolerance
-microprofile-health
-openapi-java
-opentelemetry
-opentracing
-platform-http-vertx
-reactive-executor-tomcat
-reactive-executor-vertx
-reactor
-redis
-resilience4j
-resourceresolver-github
-rxjava
-shiro
-spring-main
-spring-security
-spring-xml
-test-junit5
-test-main-junit5
-test-spring-junit5
-threadpoolfactory-vertx
-tracing
-undertow-spring-security
-wal
-xml-io-dsl
-xml-jaxb-dsl
-yaml-dsl
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/opentracing.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/opentracing.json
deleted file mode 100644
index 3e2786207ff..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/opentracing.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "opentracing",
- "title": "OpenTracing",
- "description": "Distributed tracing using OpenTracing",
- "deprecated": true,
- "firstVersion": "2.19.0",
- "label": "monitoring,microservice",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-opentracing",
- "version": "4.0.0-SNAPSHOT"
- }
-}
diff --git a/components/camel-opentracing/pom.xml b/components/camel-opentracing/pom.xml
deleted file mode 100644
index be08619aebc..00000000000
--- a/components/camel-opentracing/pom.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>components</artifactId>
- <groupId>org.apache.camel</groupId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-opentracing</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: OpenTracing (deprecated)</name>
- <description>Distributed tracing using OpenTracing</description>
-
- <properties>
- <firstVersion>2.19.0</firstVersion>
- <label>monitoring,microservice</label>
- <title>OpenTracing</title>
- <opentracing-agent.lib>${project.build.directory}/lib</opentracing-agent.lib>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-support</artifactId>
- </dependency>
- <!-- added to bypass LogProcessor -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core-processor</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-tracing</artifactId>
- </dependency>
- <!-- OpenTracing -->
- <dependency>
- <groupId>io.opentracing</groupId>
- <artifactId>opentracing-api</artifactId>
- <version>${opentracing-version}</version>
- </dependency>
- <dependency>
- <groupId>io.opentracing</groupId>
- <artifactId>opentracing-util</artifactId>
- <version>${opentracing-version}</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>io.opentracing</groupId>
- <artifactId>opentracing-noop</artifactId>
- <version>${opentracing-version}</version>
- </dependency>
- <dependency>
- <groupId>io.opentracing.contrib</groupId>
- <artifactId>opentracing-tracerresolver</artifactId>
- <version>${opentracing-tracerresolver-version}</version>
- </dependency>
-
- <!-- test dependencies -->
- <dependency>
- <groupId>io.opentracing</groupId>
- <artifactId>opentracing-mock</artifactId>
- <version>${opentracing-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.opentracing</groupId>
- <artifactId>opentracing-util</artifactId>
- <version>${opentracing-version}</version>
- <scope>test</scope>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-http</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jetty</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.glassfish.grizzly</groupId>
- <artifactId>grizzly-http-client</artifactId>
- <version>1.16</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.opentracing.contrib</groupId>
- <artifactId>opentracing-grizzly-ahc</artifactId>
- <version>0.1.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/components/camel-opentracing/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-opentracing/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index 063a8f8fbd8..00000000000
--- a/components/camel-opentracing/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-name=opentracing
-groupId=org.apache.camel
-artifactId=camel-opentracing
-version=4.0.0-SNAPSHOT
-projectName=Camel :: OpenTracing (deprecated)
-projectDescription=Distributed tracing using OpenTracing
diff --git a/components/camel-opentracing/src/generated/resources/opentracing.json b/components/camel-opentracing/src/generated/resources/opentracing.json
deleted file mode 100644
index 3e2786207ff..00000000000
--- a/components/camel-opentracing/src/generated/resources/opentracing.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "opentracing",
- "title": "OpenTracing",
- "description": "Distributed tracing using OpenTracing",
- "deprecated": true,
- "firstVersion": "2.19.0",
- "label": "monitoring,microservice",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-opentracing",
- "version": "4.0.0-SNAPSHOT"
- }
-}
diff --git a/components/camel-opentracing/src/main/docs/opentracing.adoc b/components/camel-opentracing/src/main/docs/opentracing.adoc
deleted file mode 100644
index cdd75459263..00000000000
--- a/components/camel-opentracing/src/main/docs/opentracing.adoc
+++ /dev/null
@@ -1,145 +0,0 @@
-= OpenTracing Component (deprecated)
-:doctitle: OpenTracing
-:shortname: opentracing
-:artifactid: camel-opentracing
-:description: Distributed tracing using OpenTracing
-:since: 2.19
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-//Manually maintained attributes
-:camel-spring-boot-name: opentracing
-
-*Since Camel {since}*
-
-The OpenTracing component is used for tracing and timing incoming and
-outgoing Camel messages using http://opentracing.io/[OpenTracing].
-
-Events (spans) are captured for incoming and outgoing messages being sent
-to/from Camel.
-
-See the http://opentracing.io/[OpenTracing] website for a list of supported tracers.
-
-== Configuration
-
-The configuration properties for the OpenTracing tracer are:
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Option |Default |Description
-
-|excludePatterns | | Sets exclude pattern(s) that will disable tracing for Camel
-messages that matches the pattern. The content is a Set<String> where the key is a pattern. The pattern
-uses the rules from Intercept.
-|encoding |false| Sets whether the header keys need to be encoded (connector specific) or not. The value is a boolean.
-Dashes need for instances to be encoded for JMS property keys.
-|setTracingStrategy | NoopTracingStrategy | Allows a custom Camel `InterceptStrategy` to be provided in order to
-augment the default Spans with data from each processor in a route. `OpenTracingTracingStrategy` will create spans for each
-processor, except for Camel log and OpenTracing processors, and activate a Scope in order to enable third-party instrumentation
-in processors through the default ScopeManager. Processor spans can be excluded through the exludePatterns set, these
-will be matched using the processor's ID.
-
-|=======================================================================
-
-There are three ways in which an OpenTracing tracer can be configured to provide distributed tracing for a Camel application:
-
-=== Explicit
-
-Include the `camel-opentracing` component in your POM, along with any specific dependencies associated with the chosen OpenTracing compliant Tracer.
-
-To explicitly configure OpenTracing support, instantiate the `OpenTracingTracer` and initialize the camel
-context. You can optionally specify a `Tracer`, or alternatively it can be implicitly discovered using the
-`Registry` or `ServiceLoader`.
-
-[source,java]
---------------------------------------------------------------------------------------------------
-OpenTracingTracer ottracer = new OpenTracingTracer();
-// By default it uses a Noop Tracer, but you can override it with a specific OpenTracing implementation.
-ottracer.setTracer(...);
-// And then initialize the context
-ottracer.init(camelContext);
---------------------------------------------------------------------------------------------------
-
-To use OpenTracingTracer in XML, all you need to do is to define the
-OpenTracing tracer beans. Camel will automatically discover and use them.
-
-[source,xml]
----------------------------------------------------------------------------------------------------------
- <bean id="tracer" class="..."/>
- <bean id="ottracer" class="org.apache.camel.opentracing.OpenTracingTracer">
- <property name="tracer" ref="tracer"/>
- </bean>
----------------------------------------------------------------------------------------------------------
-
-== Spring Boot
-
-If you are using Spring Boot then you can add
-the `camel-opentracing-starter` dependency, and turn on OpenTracing by annotating
-the main class with `@CamelOpenTracing`.
-
-The `Tracer` will be implicitly obtained from the camel context's `Registry`, or the `ServiceLoader`, unless
-a `Tracer` bean has been defined by the application.
-
-== Java Agent
-
-The third approach is to use a Java Agent to automatically configure the OpenTracing support.
-
-Include the `camel-opentracing` component in your POM, along with any specific dependencies associated with the chosen OpenTracing compliant Tracer.
-
-The OpenTracing Java Agent is associated with the following dependency:
-
-[source,xml]
----------------------------------------------------------------------------------------------------------
- <dependency>
- <groupId>io.opentracing.contrib</groupId>
- <artifactId>opentracing-specialagent</artifactId>
- </dependency>
----------------------------------------------------------------------------------------------------------
-
-IMPORTANT: It is necessary to use an OpenTracing compliant tracer that is
-compatible with OpenTracing Java API version 0.31 or higher.
-
-The `Tracer` used will be implicitly loaded from the camel context `Registry` or using the `ServiceLoader`.
-
-How this agent is used will be specific to how you execute your application. _Service2_ in the https://github.com/apache/camel-spring-boot-examples/tree/main/opentracing[Opentracing Spring Boot example] downloads the agent into a local folder and then uses the `exec-maven-plugin` to launch the service with the `-javaagent` command line option.
-
-== Example
-
-You can find an example demonstrating the three ways to configure OpenTracing here:
-https://github.com/apache/camel-spring-boot-examples/tree/main/opentracing[camel-spring-boot-examples/opentracing]
-
-
-include::spring-boot:partial$starter.adoc[]
-
-== Span Operations Processors
-
-The OpenTracing Component exposes the Java API span operations as a set of Processors: `TagProcessor`, `SetBaggageProcessor`, and `GetBaggageProcessor`.
-
-=== Example
-
-[source,java]
----------------------------------------------------------------------------------------------------------
-from("seda:a").routeId("a")
- .process(new SetBaggageProcessor("a-baggage", simple("${header.request-header}")))
- .to("seda:b")
- .to("seda:c");
-
-from("seda:b").routeId("b")
- .process(new TagProcessor("b-tag", simple("${header.request-header}")));
-
-from("seda:c").routeId("c")
- .process(new GetBaggageProcessor("a-baggage", "baggage-header"));
----------------------------------------------------------------------------------------------------------
-
-Where the value of header "request-header" is "foo", the resulting trace from executing route "seda:a" would include:
-
-* Span "a" with a baggage item named "a-baggage" of value "foo"
-* Span "b" with a tag named "b-tag" of value "foo"
-
-and the resulting message would contain:
-
-* Header "baggage-header" of value "foo"
-
-== MDC Logging
-When MDC Logging is enabled for the active Camel context the Trace ID and Span ID will be added and removed from the MDC for each route or processor (depending on the tracing strategy configured), the keys are `trace_id` and `span_id`, respectively.
-
-If the `OpenTracingTracingStrategy` is enabled the span ID will be the one for the current processor that logs an entry, otherwise it will be the one for the current route.
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/GetBaggageProcessor.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/GetBaggageProcessor.java
deleted file mode 100644
index 2eb3a85d07c..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/GetBaggageProcessor.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import io.opentracing.Span;
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.Exchange;
-import org.apache.camel.Traceable;
-import org.apache.camel.spi.IdAware;
-import org.apache.camel.spi.RouteIdAware;
-import org.apache.camel.support.AsyncProcessorSupport;
-import org.apache.camel.tracing.ActiveSpanManager;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A processor which gets a baggage item from the active {@link Span} and sets it as a Header
- */
-@Deprecated
-public class GetBaggageProcessor extends AsyncProcessorSupport implements Traceable, IdAware, RouteIdAware {
-
- private static final Logger LOG = LoggerFactory.getLogger(GetBaggageProcessor.class);
-
- private String id;
- private String routeId;
- private final String headerName;
- private final String baggageName;
-
- public GetBaggageProcessor(String baggageName, String headerName) {
- this.baggageName = baggageName;
- this.headerName = headerName;
- ObjectHelper.notNull(baggageName, "baggageName");
- ObjectHelper.notNull(headerName, "headerName");
- }
-
- @Override
- public boolean process(Exchange exchange, AsyncCallback callback) {
- try {
- OpenTracingSpanAdapter camelSpan = (OpenTracingSpanAdapter) ActiveSpanManager.getSpan(exchange);
- Span span = camelSpan.getOpenTracingSpan();
- if (span != null) {
- String item = span.getBaggageItem(baggageName);
- exchange.getMessage().setHeader(headerName, item);
- } else {
- LOG.warn("OpenTracing: could not find managed span for exchange={}", exchange);
- }
- } catch (Exception e) {
- exchange.setException(e);
- } finally {
- // callback must be invoked
- callback.done(true);
- }
-
- return true;
- }
-
- @Override
- public String toString() {
- return id;
- }
-
- @Override
- public String getTraceLabel() {
- return "getBaggage[" + baggageName + ", " + headerName + "]";
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public String getRouteId() {
- return routeId;
- }
-
- @Override
- public void setRouteId(String routeId) {
- this.routeId = routeId;
- }
-
- public String getBaggageName() {
- return baggageName;
- }
-
- public String getHeaderName() {
- return headerName;
- }
-
- @Override
- protected void doStart() throws Exception {
- // noop
- }
-
- @Override
- protected void doStop() throws Exception {
- // noop
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/NoopTracingStrategy.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/NoopTracingStrategy.java
deleted file mode 100644
index 10814ad7884..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/NoopTracingStrategy.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.NamedNode;
-import org.apache.camel.Processor;
-import org.apache.camel.spi.InterceptStrategy;
-import org.apache.camel.support.processor.DelegateAsyncProcessor;
-
-@Deprecated
-public class NoopTracingStrategy implements InterceptStrategy {
-
- @Override
- public Processor wrapProcessorInInterceptors(
- CamelContext camelContext, NamedNode processorDefinition,
- Processor target, Processor nextTarget)
- throws Exception {
- return new DelegateAsyncProcessor(target);
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingExtractAdapter.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingExtractAdapter.java
deleted file mode 100644
index d6a1e6d0d4a..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingExtractAdapter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.*;
-
-import io.opentracing.propagation.TextMap;
-import org.apache.camel.tracing.ExtractAdapter;
-
-@Deprecated
-public class OpenTracingExtractAdapter implements TextMap {
- ExtractAdapter adapter;
-
- OpenTracingExtractAdapter(ExtractAdapter adapter) {
- this.adapter = adapter;
- }
-
- @Override
- public Iterator<Map.Entry<String, String>> iterator() {
- return this.adapter.iterator();
- }
-
- @Override
- public void put(String s, String s1) {
- throw new UnsupportedOperationException("OpenTracingExtractAdapter should only be used with Tracer.extract()");
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingInjectAdapter.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingInjectAdapter.java
deleted file mode 100644
index b46414f1797..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingInjectAdapter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.*;
-
-import io.opentracing.propagation.TextMap;
-import org.apache.camel.tracing.InjectAdapter;
-
-@Deprecated
-public class OpenTracingInjectAdapter implements TextMap {
- private final InjectAdapter adapter;
-
- OpenTracingInjectAdapter(final InjectAdapter adapter) {
- this.adapter = adapter;
- }
-
- @Override
- public Iterator<Map.Entry<String, String>> iterator() {
- throw new UnsupportedOperationException("CamelHeadersInjectAdapter should only be used with Tracer.inject()");
- }
-
- @Override
- public void put(String key, String value) {
- this.adapter.put(key, value);
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingSpanAdapter.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingSpanAdapter.java
deleted file mode 100644
index 30dad7dfeb9..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingSpanAdapter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.EnumMap;
-import java.util.Map;
-
-import io.opentracing.tag.AbstractTag;
-import io.opentracing.tag.Tags;
-import org.apache.camel.tracing.SpanAdapter;
-import org.apache.camel.tracing.Tag;
-
-@Deprecated
-public class OpenTracingSpanAdapter implements SpanAdapter {
-
- static EnumMap<Tag, AbstractTag> tagMap = new EnumMap<>(Tag.class);
-
- static {
- tagMap.put(Tag.COMPONENT, Tags.COMPONENT);
- tagMap.put(Tag.DB_TYPE, Tags.DB_TYPE);
- tagMap.put(Tag.DB_STATEMENT, Tags.DB_STATEMENT);
- tagMap.put(Tag.DB_INSTANCE, Tags.DB_INSTANCE);
- tagMap.put(Tag.HTTP_METHOD, Tags.HTTP_METHOD);
- tagMap.put(Tag.HTTP_STATUS, Tags.HTTP_STATUS);
- tagMap.put(Tag.HTTP_URL, Tags.HTTP_URL);
- tagMap.put(Tag.ERROR, Tags.ERROR);
- tagMap.put(Tag.MESSAGE_BUS_DESTINATION, Tags.MESSAGE_BUS_DESTINATION);
- }
-
- private io.opentracing.Span span;
-
- OpenTracingSpanAdapter(io.opentracing.Span span) {
- this.span = span;
- }
-
- public io.opentracing.Span getOpenTracingSpan() {
- return this.span;
- }
-
- @Override
- public void setComponent(String component) {
- span.setTag(Tags.COMPONENT.getKey(), component);
- }
-
- @Override
- public void setError(boolean error) {
- span.setTag(Tags.ERROR.getKey(), error);
- }
-
- @Override
- public void setTag(Tag key, String value) {
- span.setTag(tagMap.get(key).getKey(), value);
- }
-
- @Override
- public void setTag(Tag key, Number value) {
- span.setTag(tagMap.get(key).getKey(), value);
- }
-
- @Override
- public void setTag(String key, String value) {
- span.setTag(key, value);
- }
-
- @Override
- public void setTag(String key, Number value) {
- span.setTag(key, value);
- }
-
- @Override
- public void setTag(String key, Boolean value) {
- span.setTag(key, value);
- }
-
- @Override
- public void log(Map<String, String> fields) {
- this.span.log(fields);
- }
-
- @Override
- public String traceId() {
- return this.span.context().toTraceId();
- }
-
- @Override
- public String spanId() {
- return this.span.context().toSpanId();
- }
-
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracer.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracer.java
deleted file mode 100644
index 7214c4ad228..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracer.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.Set;
-
-import io.opentracing.Span;
-import io.opentracing.SpanContext;
-import io.opentracing.Tracer;
-import io.opentracing.Tracer.SpanBuilder;
-import io.opentracing.contrib.tracerresolver.TracerResolver;
-import io.opentracing.noop.NoopTracerFactory;
-import io.opentracing.propagation.Format;
-import io.opentracing.tag.Tags;
-import org.apache.camel.Exchange;
-import org.apache.camel.api.management.ManagedResource;
-import org.apache.camel.spi.RoutePolicy;
-import org.apache.camel.tracing.InjectAdapter;
-import org.apache.camel.tracing.SpanAdapter;
-import org.apache.camel.tracing.SpanDecorator;
-import org.apache.camel.tracing.SpanKind;
-import org.apache.camel.tracing.decorators.AbstractInternalSpanDecorator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * To use OpenTracing with Camel then setup this {@link OpenTracingTracer} in your Camel application.
- * <p/>
- * This class is implemented as both an {@link org.apache.camel.spi.EventNotifier} and {@link RoutePolicy} that allows
- * to trap when Camel starts/ends an {@link Exchange} being routed using the {@link RoutePolicy} and during the routing
- * if the {@link Exchange} sends messages, then we track them using the {@link org.apache.camel.spi.EventNotifier}.
- */
-@ManagedResource(description = "OpenTracingTracer")
-@Deprecated
-public class OpenTracingTracer extends org.apache.camel.tracing.Tracer {
-
- private static final Logger LOG = LoggerFactory.getLogger(OpenTracingTracer.class);
-
- Tracer tracer;
-
- public OpenTracingTracer() {
- }
-
- private String mapToSpanKind(SpanKind kind) {
- switch (kind) {
- case SPAN_KIND_CLIENT:
- return Tags.SPAN_KIND_CLIENT;
- case SPAN_KIND_SERVER:
- return Tags.SPAN_KIND_SERVER;
- case CONSUMER:
- return Tags.SPAN_KIND_CONSUMER;
- case PRODUCER:
- return Tags.SPAN_KIND_PRODUCER;
- default:
- return null;
- }
- }
-
- protected void initTracer() {
- if (tracer == null) {
- Set<Tracer> tracers = getCamelContext().getRegistry().findByType(Tracer.class);
- if (tracers.size() == 1) {
- tracer = tracers.iterator().next();
- }
- }
-
- if (tracer == null) {
- tracer = TracerResolver.resolveTracer();
- }
-
- if (tracer == null) {
- // No tracer is available, so setup NoopTracer
- tracer = NoopTracerFactory.create();
- }
-
- if (tracer != null) {
- try { // Take care NOT to import GlobalTracer as it is an optional dependency and may not be on the classpath.
- io.opentracing.util.GlobalTracer.registerIfAbsent(tracer);
- } catch (NoClassDefFoundError globalTracerNotInClasspath) {
- LOG.trace("GlobalTracer is not found on the classpath.");
- }
- }
- }
-
- @Override
- protected SpanAdapter startSendingEventSpan(String operationName, SpanKind kind, SpanAdapter parent) {
- SpanBuilder spanBuilder = tracer.buildSpan(operationName).withTag(Tags.SPAN_KIND.getKey(), mapToSpanKind(kind));
- if (parent != null) {
- io.opentracing.Span parentSpan = ((OpenTracingSpanAdapter) parent).getOpenTracingSpan();
- spanBuilder.asChildOf(parentSpan);
- }
- return new OpenTracingSpanAdapter(spanBuilder.start());
- }
-
- @Override
- protected SpanAdapter startExchangeBeginSpan(
- Exchange exchange, SpanDecorator sd, String operationName, SpanKind kind, SpanAdapter parent) {
- SpanBuilder builder = tracer.buildSpan(operationName);
- if (parent != null) {
- // we found a Span already associated with this exchange, use it as parent
- Span parentFromExchange = ((OpenTracingSpanAdapter) parent).getOpenTracingSpan();
- builder.asChildOf(parentFromExchange);
- } else {
- SpanContext parentFromHeaders = tracer.extract(Format.Builtin.TEXT_MAP,
- new OpenTracingExtractAdapter(sd.getExtractAdapter(exchange.getIn().getHeaders(), encoding)));
-
- if (parentFromHeaders != null) {
- // this means it's an inter-process request or the context was manually injected into the headers
- // we add the server tag
- builder.asChildOf(parentFromHeaders).withTag(Tags.SPAN_KIND.getKey(), mapToSpanKind(sd.getReceiverSpanKind()));
- } else if (!(sd instanceof AbstractInternalSpanDecorator)) {
- // no parent found anywhere and it's not an internal endpoint
- // we add the server tag
- builder.withTag(Tags.SPAN_KIND.getKey(), mapToSpanKind(sd.getReceiverSpanKind()));
- }
- }
-
- return new OpenTracingSpanAdapter(builder.start());
- }
-
- public Tracer getTracer() {
- return tracer;
- }
-
- public void setTracer(Tracer tracer) {
- this.tracer = tracer;
- }
-
- protected void finishSpan(SpanAdapter span) {
- OpenTracingSpanAdapter openTracingSpanWrapper = (OpenTracingSpanAdapter) span;
- openTracingSpanWrapper.getOpenTracingSpan().finish();
- }
-
- protected void inject(SpanAdapter span, InjectAdapter adapter) {
- OpenTracingSpanAdapter openTracingSpanWrapper = (OpenTracingSpanAdapter) span;
- tracer.inject(openTracingSpanWrapper.getOpenTracingSpan().context(), Format.Builtin.TEXT_MAP,
- new OpenTracingInjectAdapter(adapter));
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracingStrategy.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracingStrategy.java
deleted file mode 100644
index 5c9d5301eb0..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/OpenTracingTracingStrategy.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import io.opentracing.Scope;
-import io.opentracing.Span;
-import io.opentracing.tag.Tags;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.NamedNode;
-import org.apache.camel.Processor;
-import org.apache.camel.processor.LogProcessor;
-import org.apache.camel.spi.InterceptStrategy;
-import org.apache.camel.support.PatternHelper;
-import org.apache.camel.support.processor.DelegateAsyncProcessor;
-import org.apache.camel.tracing.ActiveSpanManager;
-import org.apache.camel.tracing.SpanDecorator;
-
-@Deprecated
-public class OpenTracingTracingStrategy implements InterceptStrategy {
- private static final String UNNAMED = "unnamed";
- private final OpenTracingTracer tracer;
-
- public OpenTracingTracingStrategy(OpenTracingTracer tracer) {
- this.tracer = tracer;
- }
-
- @Override
- public Processor wrapProcessorInInterceptors(
- CamelContext camelContext,
- NamedNode processorDefinition, Processor target, Processor nextTarget)
- throws Exception {
- if (!shouldTrace(processorDefinition)) {
- return new DelegateAsyncProcessor(target);
- }
-
- return new DelegateAsyncProcessor((Exchange exchange) -> {
- OpenTracingSpanAdapter spanWrapper = (OpenTracingSpanAdapter) ActiveSpanManager.getSpan(exchange);
- Span span = spanWrapper.getOpenTracingSpan();
- if (span == null) {
- target.process(exchange);
- return;
- }
-
- final Span processorSpan = tracer.getTracer().buildSpan(getOperationName(processorDefinition))
- .asChildOf(span)
- .withTag(Tags.COMPONENT.getKey(), getComponentName(processorDefinition))
- .start();
-
- boolean activateExchange = !(target instanceof LogProcessor
- || target instanceof TagProcessor
- || target instanceof GetBaggageProcessor
- || target instanceof SetBaggageProcessor);
-
- if (activateExchange) {
- ActiveSpanManager.activate(exchange, new OpenTracingSpanAdapter(processorSpan));
- }
-
- try (Scope scope = tracer.getTracer().scopeManager().activate(processorSpan)) {
- target.process(exchange);
- } catch (Exception ex) {
- processorSpan.log(errorLogs(ex));
- throw ex;
- } finally {
- if (activateExchange) {
- ActiveSpanManager.deactivate(exchange);
- }
-
- processorSpan.finish();
- }
- });
- }
-
- private static String getComponentName(NamedNode processorDefinition) {
- return SpanDecorator.CAMEL_COMPONENT + processorDefinition.getShortName();
- }
-
- private static String getOperationName(NamedNode processorDefinition) {
- final String name = processorDefinition.getId();
- return name == null ? UNNAMED : name;
- }
-
- private static Map<String, Object> errorLogs(final Throwable t) {
- final Map<String, Object> logEvent = new HashMap<>(3);
- logEvent.put("event", Tags.ERROR.getKey());
- logEvent.put("error.kind", "Exception");
- logEvent.put("message", t.getMessage());
- return logEvent;
- }
-
- // Adapted from org.apache.camel.impl.engine.DefaultTracer.shouldTrace
- // org.apache.camel.impl.engine.DefaultTracer.shouldTracePattern
- private boolean shouldTrace(NamedNode definition) {
- for (String pattern : tracer.getExcludePatterns()) {
- // use matchPattern method from endpoint helper that has a good matcher we use in Camel
- if (PatternHelper.matchPattern(definition.getId(), pattern)) {
- return false;
- }
- }
-
- return true;
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/SetBaggageProcessor.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/SetBaggageProcessor.java
deleted file mode 100644
index efe2f82fdd6..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/SetBaggageProcessor.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import io.opentracing.Span;
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.Exchange;
-import org.apache.camel.Expression;
-import org.apache.camel.Traceable;
-import org.apache.camel.spi.IdAware;
-import org.apache.camel.spi.RouteIdAware;
-import org.apache.camel.support.AsyncProcessorSupport;
-import org.apache.camel.tracing.ActiveSpanManager;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A processor which adds a baggage item on the active {@link Span} with an {@link Expression}
- */
-@Deprecated
-public class SetBaggageProcessor extends AsyncProcessorSupport implements Traceable, IdAware, RouteIdAware {
-
- private static final Logger LOG = LoggerFactory.getLogger(SetBaggageProcessor.class);
-
- private String id;
- private String routeId;
- private final String baggageName;
- private final Expression expression;
-
- public SetBaggageProcessor(String baggageName, Expression expression) {
- this.baggageName = baggageName;
- this.expression = expression;
- ObjectHelper.notNull(baggageName, "baggageName");
- ObjectHelper.notNull(expression, "expression");
- }
-
- @Override
- public boolean process(Exchange exchange, AsyncCallback callback) {
- try {
- OpenTracingSpanAdapter camelSpan = (OpenTracingSpanAdapter) ActiveSpanManager.getSpan(exchange);
- Span span = camelSpan.getOpenTracingSpan();
- if (span != null) {
- String item = expression.evaluate(exchange, String.class);
- span.setBaggageItem(baggageName, item);
- } else {
- LOG.warn("OpenTracing: could not find managed span for exchange={}", exchange);
- }
- } catch (Exception e) {
- exchange.setException(e);
- } finally {
- // callback must be invoked
- callback.done(true);
- }
-
- return true;
- }
-
- @Override
- public String toString() {
- return id;
- }
-
- @Override
- public String getTraceLabel() {
- return "setBaggage[" + baggageName + ", " + expression + "]";
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public String getRouteId() {
- return routeId;
- }
-
- @Override
- public void setRouteId(String routeId) {
- this.routeId = routeId;
- }
-
- public String getBaggageName() {
- return baggageName.toString();
- }
-
- public Expression getExpression() {
- return expression;
- }
-
- @Override
- protected void doStart() throws Exception {
- // noop
- }
-
- @Override
- protected void doStop() throws Exception {
- // noop
- }
-}
diff --git a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/TagProcessor.java b/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/TagProcessor.java
deleted file mode 100644
index 0d980c63841..00000000000
--- a/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/TagProcessor.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import io.opentracing.Span;
-import org.apache.camel.AsyncCallback;
-import org.apache.camel.Exchange;
-import org.apache.camel.Expression;
-import org.apache.camel.Traceable;
-import org.apache.camel.spi.IdAware;
-import org.apache.camel.spi.RouteIdAware;
-import org.apache.camel.support.AsyncProcessorSupport;
-import org.apache.camel.tracing.ActiveSpanManager;
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A processor which adds a tag on the active {@link io.opentracing.Span} with an {@link org.apache.camel.Expression}
- */
-@Deprecated
-public class TagProcessor extends AsyncProcessorSupport implements Traceable, IdAware, RouteIdAware {
-
- private static final Logger LOG = LoggerFactory.getLogger(TagProcessor.class);
-
- private String id;
- private String routeId;
- private final String tagName;
- private final Expression expression;
-
- public TagProcessor(String tagName, Expression expression) {
- this.tagName = tagName;
- this.expression = expression;
- ObjectHelper.notNull(tagName, "tagName");
- ObjectHelper.notNull(expression, "expression");
- }
-
- @Override
- public boolean process(Exchange exchange, AsyncCallback callback) {
- try {
- OpenTracingSpanAdapter camelSpan = (OpenTracingSpanAdapter) ActiveSpanManager.getSpan(exchange);
- if (camelSpan != null) {
- Span span = camelSpan.getOpenTracingSpan();
- if (span != null) {
- String tag = expression.evaluate(exchange, String.class);
- span.setTag(tagName, tag);
- } else {
- LOG.warn("OpenTracing: cannot find managed span for exchange={}", exchange);
- }
- }
- } catch (Exception e) {
- exchange.setException(e);
- } finally {
- // callback must be invoked
- callback.done(true);
- }
-
- return true;
- }
-
- @Override
- public String toString() {
- return id;
- }
-
- @Override
- public String getTraceLabel() {
- return "tag[" + tagName + ", " + expression + "]";
- }
-
- @Override
- public String getId() {
- return id;
- }
-
- @Override
- public void setId(String id) {
- this.id = id;
- }
-
- @Override
- public String getRouteId() {
- return routeId;
- }
-
- @Override
- public void setRouteId(String routeId) {
- this.routeId = routeId;
- }
-
- public String getTagName() {
- return tagName;
- }
-
- public Expression getExpression() {
- return expression;
- }
-
- @Override
- protected void doStart() throws Exception {
- // noop
- }
-
- @Override
- protected void doStop() throws Exception {
- // noop
- }
-}
diff --git a/components/camel-opentracing/src/main/resources/META-INF/services/org.apache.camel.tracing.SpanDecorator b/components/camel-opentracing/src/main/resources/META-INF/services/org.apache.camel.tracing.SpanDecorator
deleted file mode 100644
index 57008acc861..00000000000
--- a/components/camel-opentracing/src/main/resources/META-INF/services/org.apache.camel.tracing.SpanDecorator
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-org.apache.camel.tracing.decorators.AhcSpanDecorator
-org.apache.camel.tracing.decorators.AmqpSpanDecorator
-org.apache.camel.tracing.decorators.CometdSpanDecorator
-org.apache.camel.tracing.decorators.CometdsSpanDecorator
-org.apache.camel.tracing.decorators.CqlSpanDecorator
-org.apache.camel.tracing.decorators.DirectSpanDecorator
-org.apache.camel.tracing.decorators.DirectvmSpanDecorator
-org.apache.camel.tracing.decorators.DisruptorSpanDecorator
-org.apache.camel.tracing.decorators.DisruptorvmSpanDecorator
-org.apache.camel.tracing.decorators.ElasticsearchSpanDecorator
-org.apache.camel.tracing.decorators.HttpSpanDecorator
-org.apache.camel.tracing.decorators.HttpsSpanDecorator
-org.apache.camel.tracing.decorators.IronmqSpanDecorator
-org.apache.camel.tracing.decorators.JdbcSpanDecorator
-org.apache.camel.tracing.decorators.JettySpanDecorator
-org.apache.camel.tracing.decorators.JmsSpanDecorator
-org.apache.camel.tracing.decorators.KafkaSpanDecorator
-org.apache.camel.tracing.decorators.LogSpanDecorator
-org.apache.camel.tracing.decorators.MongoDBSpanDecorator
-org.apache.camel.tracing.decorators.NettyHttpSpanDecorator
-org.apache.camel.tracing.decorators.NatsSpanDecorator
-org.apache.camel.tracing.decorators.NsqSpanDecorator
-org.apache.camel.tracing.decorators.PahoSpanDecorator
-org.apache.camel.tracing.decorators.PlatformHttpSpanDecorator
-org.apache.camel.tracing.decorators.RestSpanDecorator
-org.apache.camel.tracing.decorators.SedaSpanDecorator
-org.apache.camel.tracing.decorators.ServletSpanDecorator
-org.apache.camel.tracing.decorators.SjmsSpanDecorator
-org.apache.camel.tracing.decorators.Sjms2SpanDecorator
-org.apache.camel.tracing.decorators.SqlSpanDecorator
-org.apache.camel.tracing.decorators.StompSpanDecorator
-org.apache.camel.tracing.decorators.TimerSpanDecorator
-org.apache.camel.tracing.decorators.UndertowSpanDecorator
-org.apache.camel.tracing.decorators.VertxHttpSpanDecorator
-org.apache.camel.tracing.decorators.VmSpanDecorator
-
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ABCRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ABCRouteTest.java
deleted file mode 100644
index e4cb53f5b2d..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ABCRouteTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class ABCRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(2).addLogMessage("routing at b"),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(2).addLogMessage("Exchange[ExchangePattern: InOut, BodyType: String, Body: Hello]"),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(3).addLogMessage("routing at a").addLogMessage("End of routing"),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public ABCRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}")
- .to("seda:b")
- .delay(2000)
- .to("seda:c")
- .log("End of routing");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"));
-
- from("seda:c").routeId("c")
- .to("log:test")
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CamelOpenTracingTestSupport.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CamelOpenTracingTestSupport.java
deleted file mode 100644
index 223e0eeeaeb..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CamelOpenTracingTestSupport.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import io.opentracing.Span;
-import io.opentracing.mock.MockSpan;
-import io.opentracing.mock.MockTracer;
-import io.opentracing.mock.MockTracer.Propagator;
-import io.opentracing.tag.Tags;
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.InterceptStrategy;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.camel.tracing.SpanDecorator;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class CamelOpenTracingTestSupport extends CamelTestSupport {
-
- protected OpenTracingTracer ottracer;
- private MockTracer tracer;
- private SpanTestData[] testdata;
-
- public CamelOpenTracingTestSupport(SpanTestData[] testdata) {
- this.testdata = testdata;
- }
-
- @Override
- protected void doPostSetup() {
- tracer.reset();
- }
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext context = super.createCamelContext();
-
- tracer = new MockTracer(Propagator.TEXT_MAP);
-
- this.ottracer = new OpenTracingTracer();
- ottracer.setTracer(tracer);
- ottracer.setExcludePatterns(getExcludePatterns());
- ottracer.setTracingStrategy(getTracingStrategy());
- ottracer.addDecorator(new TestSEDASpanDecorator());
- ottracer.init(context);
- return context;
- }
-
- protected MockTracer getTracer() {
- return tracer;
- }
-
- protected Set<String> getExcludePatterns() {
- return new HashSet<>();
- }
-
- protected void verify() {
- verify(false);
- }
-
- protected void verify(boolean async) {
- List<MockSpan> spans = tracer.finishedSpans();
- spans.forEach(mockSpan -> {
- System.out.println("Span: " + mockSpan);
- System.out.println("\tComponent: " + mockSpan.tags().get(Tags.COMPONENT.getKey()));
- System.out.println("\tTags: " + mockSpan.tags());
- System.out.println("\tLogs: ");
- for (final MockSpan.LogEntry logEntry : mockSpan.logEntries()) {
- System.out.println("\t" + logEntry.fields());
- }
- });
-
- assertEquals(testdata.length, tracer.finishedSpans().size(), "Incorrect number of spans");
-
- verifySameTrace();
-
- if (async) {
- final List<MockSpan> unsortedSpans = spans;
- spans = Arrays.stream(testdata)
- .map(td -> findSpan(td, unsortedSpans)).distinct().collect(Collectors.toList());
- assertEquals(testdata.length, spans.size(), "Incorrect number of spans after sorting");
- }
-
- for (int i = 0; i < testdata.length; i++) {
- verifySpan(i, testdata, spans);
- }
- }
-
- protected MockSpan findSpan(SpanTestData testdata, List<MockSpan> spans) {
- return spans.stream().filter(s -> {
- boolean matched = s.operationName().equals(testdata.getOperation());
-
- if (s.tags().containsKey("camel-uri")) {
- matched = matched && s.tags().get("camel.uri").equals(testdata.getUri());
- }
-
- if (s.tags().containsKey(Tags.SPAN_KIND.getKey())) {
- matched = matched && s.tags().get(Tags.SPAN_KIND.getKey()).equals(testdata.getKind());
- }
-
- return matched;
- }).findFirst().orElse(null);
- }
-
- protected void verifySpan(int index, SpanTestData[] testdata, List<MockSpan> spans) {
- MockSpan span = spans.get(index);
- SpanTestData td = testdata[index];
-
- String component = (String) span.tags().get(Tags.COMPONENT.getKey());
- assertNotNull(component);
-
- if (td.getUri() != null) {
- assertEquals(SpanDecorator.CAMEL_COMPONENT + URI.create(td.getUri()).getScheme(), component, td.getLabel());
- }
- assertEquals(td.getUri(), span.tags().get("camel.uri"), td.getLabel());
-
- // If span associated with org.apache.camel.opentracing.TestSEDASpanDecorator, check that pre/post tags have been defined
- if ("camel-seda".equals(component)) {
- assertTrue(span.tags().containsKey("pre"));
- assertTrue(span.tags().containsKey("post"));
- }
-
- assertEquals(td.getOperation(), span.operationName(), td.getLabel());
-
- assertEquals(td.getKind(), span.tags().get(Tags.SPAN_KIND.getKey()), td.getLabel());
-
- if (td.getParentId() != -1) {
- assertEquals(spans.get(td.getParentId()).context().spanId(), span.parentId(), td.getLabel());
- }
-
- if (!td.getLogMessages().isEmpty()) {
- assertEquals(td.getLogMessages().size(), span.logEntries().size(), td.getLabel());
- for (int i = 0; i < td.getLogMessages().size(); i++) {
- assertEquals(td.getLogMessages().get(i), span.logEntries().get(i).fields().get("message"));
- }
- }
-
- if (!td.getTags().isEmpty()) {
- for (Map.Entry<String, String> entry : td.getTags().entrySet()) {
- assertEquals(entry.getValue(), String.valueOf(span.tags().get(entry.getKey())));
- }
- }
-
- if (!td.getBaggage().isEmpty()) {
- for (Map.Entry<String, String> entry : td.getBaggage().entrySet()) {
- assertEquals(entry.getValue(), span.getBaggageItem(entry.getKey()));
- }
- }
- }
-
- protected void verifySameTrace() {
- assertEquals(1, tracer.finishedSpans().stream().map(s -> s.context().traceId()).distinct().count());
- }
-
- protected void verifyTraceSpanNumbers(int numOfTraces, int numSpansPerTrace) {
- Map<Long, List<Span>> traces = new HashMap<>();
-
- // Sort spans into separate traces
- for (int i = 0; i < getTracer().finishedSpans().size(); i++) {
- List<Span> spans = traces.get(getTracer().finishedSpans().get(i).context().traceId());
- if (spans == null) {
- spans = new ArrayList<>();
- traces.put(getTracer().finishedSpans().get(i).context().traceId(), spans);
- }
- spans.add(getTracer().finishedSpans().get(i));
- }
-
- assertEquals(numOfTraces, traces.size());
-
- for (Map.Entry<Long, List<Span>> spans : traces.entrySet()) {
- assertEquals(numSpansPerTrace, spans.getValue().size());
- }
- }
-
- protected InterceptStrategy getTracingStrategy() {
- return new NoopTracingStrategy();
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ClientRecipientListRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ClientRecipientListRouteTest.java
deleted file mode 100644
index 7a9a2ed7b6c..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ClientRecipientListRouteTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class ClientRecipientListRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(3),
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(3),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(3),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public ClientRecipientListRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").recipientList(constant("seda:a,seda:b,seda:c")).routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"));
-
- from("seda:c").routeId("c")
- .log("routing at ${routeId}")
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CustomComponentNameRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CustomComponentNameRouteTest.java
deleted file mode 100644
index cafd243fddb..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/CustomComponentNameRouteTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class CustomComponentNameRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("myseda:b server").setUri("myseda://b").setOperation("b")
- .setParentId(2).addLogMessage("routing at b"),
- new SpanTestData().setLabel("myseda:c server").setUri("myseda://c").setOperation("c")
- .setParentId(2).addLogMessage("Exchange[ExchangePattern: InOut, BodyType: String, Body: Hello]"),
- new SpanTestData().setLabel("myseda:a server").setUri("myseda://a").setOperation("a")
- .setParentId(3).addLogMessage("routing at a").addLogMessage("End of routing"),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public CustomComponentNameRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- context.addComponent("myseda", context.getComponent("seda"));
-
- from("direct:start").to("myseda:a").routeId("start");
-
- from("myseda:a").routeId("a")
- .log("routing at ${routeId}")
- .to("myseda:b")
- .delay(2000)
- .to("myseda:c")
- .log("End of routing");
-
- from("myseda:b").routeId("b")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"));
-
- from("myseda:c").routeId("c")
- .to("log:test")
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingActiveSpanTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingActiveSpanTest.java
deleted file mode 100644
index cc27211f152..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingActiveSpanTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import io.opentracing.tag.Tags;
-import io.opentracing.util.GlobalTracer;
-import io.opentracing.util.GlobalTracerTestUtil;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.InterceptStrategy;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-@Disabled
-public class EIPTracingActiveSpanTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("active-span server").setOperation("using-active-span")
- .setParentId(1),
- new SpanTestData().setLabel("process server").setOperation("direct-processor")
- .setParentId(2),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public EIPTracingActiveSpanTest() {
- super(testdata);
- }
-
- @Override
- public void doPreSetup() {
- GlobalTracerTestUtil.resetGlobalTracer();
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected InterceptStrategy getTracingStrategy() {
- return new OpenTracingTracingStrategy(ottracer);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").routeId("start").process(new Processor() {
- @Override
- public void process(Exchange exchange) {
- // here you can use GlobalTracer if it's in your classpath or
- // use the exchange context to look for a tracer in the registry
- GlobalTracer.get().buildSpan("using-active-span")
- .withTag(Tags.COMPONENT.getKey(), "custom-component")
- .asChildOf(GlobalTracer.get().activeSpan())
- .start().finish();
- }
- }).id("direct-processor");
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingRouteTest.java
deleted file mode 100644
index 26139553cf5..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/EIPTracingRouteTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.InterceptStrategy;
-import org.junit.jupiter.api.Test;
-
-public class EIPTracingRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("a-log-1 server").setOperation("a-log-1")
- .setParentId(11),
- new SpanTestData().setLabel("b-log server").setOperation("b-log")
- .setParentId(3),
- new SpanTestData().setLabel("b-delay server").setOperation("b-delay")
- .setParentId(3),
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(4).addLogMessage("routing at b"),
- new SpanTestData().setLabel("a-to-1 server").setOperation("a-to-1")
- .setParentId(11),
- new SpanTestData().setLabel("a-delay server").setOperation("a-delay")
- .setParentId(11),
- new SpanTestData().setLabel("c-to server").setOperation("c-to")
- .setParentId(8).addLogMessage("Exchange[ExchangePattern: InOut, BodyType: String, Body: Hello]"),
- new SpanTestData().setLabel("c-delay server").setOperation("c-delay")
- .setParentId(8),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(9),
- new SpanTestData().setLabel("a-to-2 server").setOperation("a-to-2")
- .setParentId(11),
- new SpanTestData().setLabel("a-log-2 server").setOperation("a-log-2")
- .setParentId(11),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(12).addLogMessage("routing at a").addLogMessage("End of routing"),
- new SpanTestData().setLabel("direct-to server").setOperation("direct-to")
- .setParentId(13),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public EIPTracingRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected InterceptStrategy getTracingStrategy() {
- return new OpenTracingTracingStrategy(ottracer);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").routeId("start")
- .to("seda:a").id("direct-to");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}").id("a-log-1")
- .to("seda:b").id("a-to-1")
- .delay(2000).id("a-delay")
- .to("seda:c").id("a-to-2")
- .log("End of routing").id("a-log-2");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}").id("b-log")
- .delay(simple("${random(1000,2000)}")).id("b-delay");
-
- from("seda:c").routeId("c")
- .to("log:test").id("c-to")
- .delay(simple("${random(0,100)}")).id("c-delay");
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MDCSupportTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MDCSupportTest.java
deleted file mode 100644
index e8891c8a448..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MDCSupportTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-import org.slf4j.MDC;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class MDCSupportTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(1),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public MDCSupportTest() {
- super(testdata);
- }
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext camelContext = super.createCamelContext();
- camelContext.setUseMDCLogging(true);
- return camelContext;
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").routeId("start");
-
- from("seda:a").routeId("a")
- .process(new Processor() {
- public void process(Exchange exchange) {
- assertNotNull(MDC.get("trace_id"));
- assertNotNull(MDC.get("span_id"));
- }
- });
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastParallelRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastParallelRouteTest.java
deleted file mode 100644
index ce4e9005b36..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastParallelRouteTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class MulticastParallelRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(2).addLogMessage("routing at b"),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(2).addLogMessage("routing at c"),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(3).addLogMessage("routing at a").addLogMessage("End of routing"),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public MulticastParallelRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify(true);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}")
- .multicast().parallelProcessing()
- .to("seda:b", "seda:c")
- .end()
- .log("End of routing");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"));
-
- from("seda:c").routeId("c")
- .log("routing at ${routeId}")
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastRouteTest.java
deleted file mode 100644
index cea08e1cf77..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/MulticastRouteTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class MulticastRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(2),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(2),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(3),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public MulticastRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}")
- .multicast()
- .to("seda:b")
- .to("seda:c")
- .end()
- .log("End of routing");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"));
-
- from("seda:c").routeId("c")
- .log("routing at ${routeId}")
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/OpentracingSpanCollectorInRegistryTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/OpentracingSpanCollectorInRegistryTest.java
deleted file mode 100644
index baa2091dcb5..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/OpentracingSpanCollectorInRegistryTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import io.opentracing.noop.NoopTracer;
-import io.opentracing.noop.NoopTracerFactory;
-import io.opentracing.util.GlobalTracerTestUtil;
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.CamelContext;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class OpentracingSpanCollectorInRegistryTest extends CamelTestSupport {
-
- private OpenTracingTracer openTracing;
- @BindToRegistry("tracer")
- private NoopTracer c = NoopTracerFactory.create();
-
- @Override
- public void doPreSetup() {
- GlobalTracerTestUtil.resetGlobalTracer();
- }
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext context = super.createCamelContext();
-
- openTracing = new OpenTracingTracer();
- openTracing.init(context);
-
- return context;
- }
-
- @Test
- public void testZipkinConfiguration() {
- assertNotNull(openTracing.getTracer());
- assertTrue(openTracing.getTracer() instanceof NoopTracer);
- }
-
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/RouteConcurrentTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/RouteConcurrentTest.java
deleted file mode 100644
index 8176c8244a4..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/RouteConcurrentTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class RouteConcurrentTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("seda:foo server").setUri("seda://foo?concurrentConsumers=5").setOperation("foo"),
- new SpanTestData().setLabel("seda:bar server").setUri("seda://bar?concurrentConsumers=5").setOperation("bar")
- .setParentId(0)
- };
-
- public RouteConcurrentTest() {
- super(testdata);
- }
-
- @Test
- public void testSingleInvocationsOfRoute() {
- NotifyBuilder notify = new NotifyBuilder(context).whenDone(2).create();
-
- template.sendBody("seda:foo", "Hello World");
-
- assertTrue(notify.matches(30, TimeUnit.SECONDS));
-
- verify();
- }
-
- @Test
- public void testConcurrentInvocationsOfRoute() {
- NotifyBuilder notify = new NotifyBuilder(context).whenDone(10).create();
-
- for (int i = 0; i < 5; i++) {
- template.sendBody("seda:foo", "Hello World");
- }
-
- assertTrue(notify.matches(30, TimeUnit.SECONDS));
-
- verifyTraceSpanNumbers(5, testdata.length);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("seda:foo?concurrentConsumers=5").routeId("foo")
- .log("routing at ${routeId}")
- .delay(simple("${random(1000,2000)}"))
- .to("seda:bar");
-
- from("seda:bar?concurrentConsumers=5").routeId("bar")
- .log("routing at ${routeId}")
- .delay(simple("${random(0,500)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanProcessorsTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanProcessorsTest.java
deleted file mode 100644
index f29fc9af53d..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanProcessorsTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.language.simple.SimpleLanguage.simple;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class SpanProcessorsTest extends CamelOpenTracingTestSupport {
-
- private static final SpanTestData[] TEST_DATA = {
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(2).addLogMessage("routing at b")
- .addTag("b-tag", "request-header-value"),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(2).addLogMessage("Exchange[ExchangePattern: InOut, BodyType: String, Body: Hello]"),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(3).addLogMessage("routing at a").addLogMessage("End of routing")
- .addBaggage("a-baggage", "request-header-value"),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public SpanProcessorsTest() {
- super(TEST_DATA);
- }
-
- @Test
- public void testRoute() {
- Exchange result = template.request("direct:start",
- exchange -> {
- exchange.getIn().setBody("Hello");
- exchange.getIn().setHeader("request-header", simple("request-header-value"));
- });
-
- verify();
- assertEquals("request-header-value", result.getMessage().getHeader("baggage-header", String.class));
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}")
- .process(new SetBaggageProcessor("a-baggage", simple("${header.request-header}")))
- .to("seda:b")
- .delay(2000)
- .to("seda:c")
- .log("End of routing");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}")
- .process(new TagProcessor("b-tag", simple("${header.request-header}")))
- .delay(simple("${random(1000,2000)}"));
-
- from("seda:c").routeId("c")
- .to("log:test")
- .process(new GetBaggageProcessor("a-baggage", "baggage-header"))
- .delay(simple("${random(0,100)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanTestData.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanTestData.java
deleted file mode 100644
index 8c55724c7e5..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpanTestData.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class SpanTestData {
-
- private String label;
- private String uri;
- private String operation;
- private String kind;
- private int parentId = -1;
- private List<String> logMessages = new ArrayList<>();
- private Map<String, String> tags = new HashMap<>();
- private Map<String, String> baggage = new HashMap<>();
-
- public String getLabel() {
- return label;
- }
-
- public SpanTestData setLabel(String label) {
- this.label = label;
- return this;
- }
-
- public String getUri() {
- return uri;
- }
-
- public SpanTestData setUri(String uri) {
- this.uri = uri;
- return this;
- }
-
- public String getOperation() {
- return operation;
- }
-
- public SpanTestData setOperation(String operation) {
- this.operation = operation;
- return this;
- }
-
- public String getKind() {
- return kind;
- }
-
- public SpanTestData setKind(String kind) {
- this.kind = kind;
- return this;
- }
-
- public int getParentId() {
- return parentId;
- }
-
- public SpanTestData setParentId(int parentId) {
- this.parentId = parentId;
- return this;
- }
-
- public SpanTestData addLogMessage(String mesg) {
- logMessages.add(mesg);
- return this;
- }
-
- public List<String> getLogMessages() {
- return logMessages;
- }
-
- public SpanTestData addTag(String key, String val) {
- tags.put(key, val);
- return this;
- }
-
- public Map<String, String> getTags() {
- return tags;
- }
-
- public SpanTestData addBaggage(String key, String val) {
- baggage.put(key, val);
- return this;
- }
-
- public Map<String, String> getBaggage() {
- return baggage;
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpringOpenTracingSimpleRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpringOpenTracingSimpleRouteTest.java
deleted file mode 100644
index 28e9c7a9f11..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/SpringOpenTracingSimpleRouteTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.concurrent.TimeUnit;
-
-import io.opentracing.mock.MockTracer;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class SpringOpenTracingSimpleRouteTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("org/apache/camel/opentracing/OpenTracingSimpleRouteTest.xml");
- }
-
- @Test
- public void testRoute() {
- NotifyBuilder notify = new NotifyBuilder(context).whenDone(5).create();
-
- for (int i = 0; i < 5; i++) {
- template.sendBody("seda:dude", "Hello World");
- }
-
- assertTrue(notify.matches(30, TimeUnit.SECONDS));
-
- MockTracer tracer = (MockTracer) context().getRegistry().lookupByName("mockTracer");
-
- // Two spans per invocation, one for server dude route, one for car route
- assertEquals(10, tracer.finishedSpans().size());
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TestSEDASpanDecorator.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TestSEDASpanDecorator.java
deleted file mode 100644
index 2599ebefa9e..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TestSEDASpanDecorator.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.tracing.SpanAdapter;
-import org.apache.camel.tracing.decorators.SedaSpanDecorator;
-
-public class TestSEDASpanDecorator extends SedaSpanDecorator {
-
- @Override
- public void pre(SpanAdapter span, Exchange exchange, Endpoint endpoint) {
- super.pre(span, exchange, endpoint);
- span.setTag("pre", "test");
- }
-
- @Override
- public void post(SpanAdapter span, Exchange exchange, Endpoint endpoint) {
- super.post(span, exchange, endpoint);
- span.setTag("post", "test");
- }
-
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ThirdPartyInstrumentationIT.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ThirdPartyInstrumentationIT.java
deleted file mode 100644
index 7c13a48e238..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/ThirdPartyInstrumentationIT.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import io.opentracing.Scope;
-import io.opentracing.Span;
-import io.opentracing.Tracer;
-import io.opentracing.mock.MockSpan;
-import io.opentracing.mock.MockTracer;
-import io.opentracing.tag.Tags;
-import io.opentracing.util.ThreadLocalScopeManager;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.apache.camel.util.function.ThrowingRunnable;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-/**
- * Validates that {@link OpenTracingTracer} is compatible with third-party tracing solutions, i.e. integrates into
- * active traces and allows others to integrate into Camel-initialized traces.
- */
-public class ThirdPartyInstrumentationIT extends CamelTestSupport {
-
- private MockTracer tracer;
-
- @Override
- protected void doPostSetup() {
- tracer.reset();
- }
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext context = super.createCamelContext();
-
- tracer = new MockTracer(new ThreadLocalScopeManager(), MockTracer.Propagator.TEXT_MAP);
-
- OpenTracingTracer openTracingTracer = new OpenTracingTracer();
- openTracingTracer.setTracer(tracer);
- openTracingTracer.setTracingStrategy(new OpenTracingTracingStrategy(openTracingTracer));
- openTracingTracer.init(context);
- return context;
- }
-
- @Test
- public void testBasicIntegrationUseCase() {
- template.requestBody("direct:DirectProcessor", "");
-
- List<MockSpan> actualSpans = tracer.finishedSpans();
- assertEquals(3, actualSpans.size(), "Unexpected spans registered");
-
- Set<Long> traceIds = getTraceIds(actualSpans);
- assertEquals(1, traceIds.size(), () -> "Expected all spans belonging to the same trace, but got: " + traceIds);
- }
-
- @Test
- public void testTracingContextIsCleanedUp() {
- // execute the route multiple times on the same thread to ensure active trace is reset upon route completion
- template.requestBody("direct:DirectProcessor", "");
- template.requestBody("direct:DirectProcessor", "");
-
- List<MockSpan> actualSpans = tracer.finishedSpans();
- assertEquals(6, actualSpans.size(), "Unexpected spans registered");
-
- Set<Long> traceIds = getTraceIds(actualSpans);
- assertEquals(2, traceIds.size(), () -> "Expected all spans belonging to two traces, but got: " + traceIds);
- }
-
- @Test
- public void testCamelIntegratesIntoActiveTrace() {
- executeInThirdPartySpan(() -> template.requestBody("direct:DirectProcessor", ""));
-
- List<MockSpan> actualSpans = tracer.finishedSpans();
- assertEquals(4, actualSpans.size(), "Unexpected spans registered");
-
- Set<Long> traceIds = getTraceIds(actualSpans);
- assertEquals(1, traceIds.size(), "Expected all spans belonging to the same trace, but got: " + traceIds);
- }
-
- private Set<Long> getTraceIds(List<MockSpan> actualSpans) {
- return actualSpans.stream()
- .map(span -> span.context().traceId())
- .collect(Collectors.toSet());
- }
-
- /**
- * Simulates third-party instrumentation
- */
- private void tracingProcessor(Exchange exchange) {
- executeInThirdPartySpan(() -> Thread.sleep(1000));
- }
-
- private void executeInThirdPartySpan(ThrowingRunnable<Exception> closure) {
- Tracer.SpanBuilder spanBuilder = tracer.buildSpan("third-party-span")
- .withTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER);
- Span span = spanBuilder.start();
- try (Scope ignored = tracer.scopeManager().activate(span)) {
- closure.run();
- } catch (Exception e) {
- Tags.ERROR.set(span, Boolean.TRUE);
- } finally {
- span.finish();
- }
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:DirectProcessor")
- .process(ThirdPartyInstrumentationIT.this::tracingProcessor);
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingClientRecipientListRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingClientRecipientListRouteTest.java
deleted file mode 100644
index 12d973517f7..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingClientRecipientListRouteTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.InterceptStrategy;
-import org.junit.jupiter.api.Test;
-
-public class TracingClientRecipientListRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("a: log").setOperation("a-log-1")
- .setParentId(1),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(8),
- new SpanTestData().setLabel("b: log").setOperation("b-log-2")
- .setParentId(4),
- new SpanTestData().setLabel("b: delay").setOperation("b-delay-1")
- .setParentId(4),
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(8),
- new SpanTestData().setLabel("c: log").setOperation("c-log-3")
- .setParentId(7),
- new SpanTestData().setLabel("c: delay").setOperation("c-delay-2")
- .setParentId(7),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(8),
- new SpanTestData().setLabel("a: recipientList").setOperation("direct-recipientList-1")
- .setParentId(9),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public TracingClientRecipientListRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").recipientList(constant("seda:a,seda:b,seda:c")).id("direct-recipientList-1")
- .routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}").id("a-log-1");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}").id("b-log-2")
- .delay(simple("${random(1000,2000)}")).id("b-delay-1");
-
- from("seda:c").routeId("c")
- .log("routing at ${routeId}").id("c-log-3")
- .delay(simple("${random(0,100)}")).id("c-delay-2");
- }
- };
- }
-
- @Override
- protected InterceptStrategy getTracingStrategy() {
- return new OpenTracingTracingStrategy(ottracer);
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingMulticastParallelRouteTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingMulticastParallelRouteTest.java
deleted file mode 100644
index 2a4a11d408d..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TracingMulticastParallelRouteTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spi.InterceptStrategy;
-import org.junit.jupiter.api.Test;
-
-public class TracingMulticastParallelRouteTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("a: a-log-1").setOperation("a-log-1")
- .setParentId(11),
- new SpanTestData().setLabel("b: b-log-3").setOperation("b-log-3")
- .setParentId(7),
- new SpanTestData().setLabel("c: c-log-4").setOperation("c-log-4")
- .setParentId(4),
- new SpanTestData().setLabel("c: c-delay-2").setOperation("c-delay-2")
- .setParentId(4),
- new SpanTestData().setLabel("seda:c server").setUri("seda://c").setOperation("c")
- .setParentId(5).addLogMessage("routing at c"),
- new SpanTestData().setLabel("a:multicast: a-to-3").setOperation("a-to-3")
- .setParentId(9),
- new SpanTestData().setLabel("b: b-delay-1").setOperation("b-delay-1")
- .setParentId(7),
- new SpanTestData().setLabel("seda:b server").setUri("seda://b").setOperation("b")
- .setParentId(8).addLogMessage("routing at b"),
- new SpanTestData().setLabel("a:multicast: a-to-2").setOperation("a-to-2")
- .setParentId(9),
- new SpanTestData().setLabel("a: multicast").setOperation("a-multicast-1")
- .setParentId(11),
- new SpanTestData().setLabel("a: a-log-2").setOperation("a-log-2")
- .setParentId(11),
- new SpanTestData().setLabel("seda:a server").setUri("seda://a").setOperation("a")
- .setParentId(12).addLogMessage("routing at a").addLogMessage("End of routing"),
- new SpanTestData().setLabel("direct:start server").setOperation("direct-to-1")
- .setParentId(13),
- new SpanTestData().setLabel("direct:start server").setUri("direct://start").setOperation("start")
- };
-
- public TracingMulticastParallelRouteTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:start", "Hello");
-
- verify(true);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").to("seda:a").id("direct-to-1").routeId("start");
-
- from("seda:a").routeId("a")
- .log("routing at ${routeId}").id("a-log-1")
- .multicast().parallelProcessing().id("a-multicast-1")
- // to(String...) only sets the .id(String) on the first element, others will be dynamic
- .to("seda:b").id("a-to-2")
- .to("seda:c").id("a-to-3")
- .end()
- .log("End of routing").id("a-log-2");
-
- from("seda:b").routeId("b")
- .log("routing at ${routeId}").id("b-log-3")
- .delay(simple("${random(1000,2000)}")).id("b-delay-1");
-
- from("seda:c").routeId("c")
- .log("routing at ${routeId}").id("c-log-4")
- .delay(simple("${random(0,100)}")).id("c-delay-2");
- }
- };
- }
-
- @Override
- protected InterceptStrategy getTracingStrategy() {
- return new OpenTracingTracingStrategy(ottracer);
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceTest.java
deleted file mode 100644
index 8e6aa82a25e..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class TwoServiceTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("ServiceB server").setUri("direct://ServiceB").setOperation("ServiceB")
- .setParentId(1),
- new SpanTestData().setLabel("ServiceA server").setUri("direct://ServiceA").setOperation("ServiceA")
- };
-
- public TwoServiceTest() {
- super(testdata);
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:ServiceA", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:ServiceA")
- .log("ServiceA has been called")
- .delay(simple("${random(1000,2000)}"))
- .to("direct:ServiceB");
-
- from("direct:ServiceB")
- .log("ServiceB has been called")
- .delay(simple("${random(0,500)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceWithExcludeTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceWithExcludeTest.java
deleted file mode 100644
index e6774208973..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/TwoServiceWithExcludeTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.junit.jupiter.api.Test;
-
-public class TwoServiceWithExcludeTest extends CamelOpenTracingTestSupport {
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("ServiceA server").setUri("direct://ServiceA").setOperation("ServiceA")
- };
-
- public TwoServiceWithExcludeTest() {
- super(testdata);
- }
-
- @Override
- protected Set<String> getExcludePatterns() {
- return Collections.singleton("direct:ServiceB");
- }
-
- @Test
- public void testRoute() {
- template.requestBody("direct:ServiceA", "Hello");
-
- verify();
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:ServiceA")
- .log("ServiceA has been called")
- .delay(simple("${random(1000,2000)}"))
- .to("direct:ServiceB");
-
- from("direct:ServiceB")
- .log("ServiceB has been called")
- .delay(simple("${random(0,500)}"));
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java
deleted file mode 100644
index ec2860cf16c..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/agent/InstallOpenTracingTracerRuleTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing.agent;
-
-import java.util.List;
-
-import io.opentracing.mock.MockSpan;
-import io.opentracing.mock.MockTracer;
-import io.opentracing.mock.MockTracer.Propagator;
-import io.opentracing.tag.Tags;
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@Disabled
-public class InstallOpenTracingTracerRuleTest extends CamelTestSupport {
-
- @BindToRegistry("tracer")
- private static MockTracer tracer = new MockTracer(Propagator.TEXT_MAP);
-
- @EndpointInject("mock:result")
- protected MockEndpoint resultEndpoint;
-
- @Produce("direct:start")
- protected ProducerTemplate template;
-
- @BeforeEach
- public void init() {
- tracer.reset();
- }
-
- public static MockTracer getTracer() {
- return tracer;
- }
-
- @Override
- public boolean isDumpRouteCoverage() {
- return true;
- }
-
- @Test
- public void testSendMatchingMessage() throws Exception {
- String expectedBody = "<matched/>";
-
- resultEndpoint.expectedBodiesReceived(expectedBody);
-
- template.sendBodyAndHeader(expectedBody, "foo", "bar");
-
- resultEndpoint.assertIsSatisfied();
-
- List<MockSpan> spans = getTracer().finishedSpans();
- assertEquals(3, spans.size());
- assertEquals("mock", spans.get(0).operationName());
- assertEquals("start", spans.get(1).operationName());
- assertEquals("start", spans.get(2).operationName());
- assertEquals(Tags.SPAN_KIND_CLIENT, spans.get(0).tags().get(Tags.SPAN_KIND.getKey()));
- assertEquals(Tags.SPAN_KIND_SERVER, spans.get(1).tags().get(Tags.SPAN_KIND.getKey()));
- assertEquals(Tags.SPAN_KIND_CLIENT, spans.get(2).tags().get(Tags.SPAN_KIND.getKey()));
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("direct:start").filter(header("foo").isEqualTo("bar")).to("mock:result");
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/integration/InterprocessIT.java b/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/integration/InterprocessIT.java
deleted file mode 100644
index 9f372d3d119..00000000000
--- a/components/camel-opentracing/src/test/java/org/apache/camel/opentracing/integration/InterprocessIT.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.opentracing.integration;
-
-import com.ning.http.client.AsyncHttpClient;
-import com.ning.http.client.AsyncHttpClientConfig;
-import io.opentracing.contrib.grizzly.ahc.TracingRequestFilter;
-import io.opentracing.tag.Tags;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.opentracing.CamelOpenTracingTestSupport;
-import org.apache.camel.opentracing.SpanTestData;
-import org.apache.camel.test.AvailablePortFinder;
-import org.junit.jupiter.api.Test;
-
-public class InterprocessIT extends CamelOpenTracingTestSupport {
- private static final String URL = "http://localhost:" + AvailablePortFinder.getNextAvailable() + "/test";
- private static final String URI = "jetty:" + URL;
-
- private static SpanTestData[] testdata = {
- new SpanTestData().setLabel("jetty:start server").setUri(URI).setOperation("GET")
- .setKind("server")
- .addTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER)
- .addTag(Tags.COMPONENT.getKey(), "camel-jetty")
- .addTag(Tags.HTTP_URL.getKey(), URL)
- .addTag(Tags.HTTP_METHOD.getKey(), "GET")
- // jetty does not set the http response code header
- // this is where instrumentation has value
- // .addTag(Tags.HTTP_STATUS.getKey(), "200")
- .setParentId(1),
- new SpanTestData().setLabel("ahc: client").setUri(null).setOperation("HTTP::GET")
- .setKind("client")
- .addTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_CLIENT)
- .addTag(Tags.COMPONENT.getKey(), "java-grizzly-ahc")
- .addTag(Tags.HTTP_URL.getKey(), URL)
- .addTag(Tags.HTTP_METHOD.getKey(), "GET")
- .addTag(Tags.HTTP_STATUS.getKey(), "200")
- };
-
- public InterprocessIT() {
- super(testdata);
- }
-
- @Test
- public void testBridgeEndpoint() throws Exception {
- AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()
- .addRequestFilter(new TracingRequestFilter(getTracer()))
- .build();
-
- try (AsyncHttpClient client = new AsyncHttpClient(config)) {
- client.prepareGet(URL).execute().get();
- }
-
- verify();
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- Processor serviceProc = new Processor() {
- public void process(Exchange exchange) {
- // get the request URL and copy it to the request body
- String uri = exchange.getIn().getHeader(Exchange.HTTP_URI, String.class);
- exchange.getMessage().setBody(uri);
- }
- };
-
- from(URI).process(serviceProc);
- }
- };
- }
-}
diff --git a/components/camel-opentracing/src/test/resources/log4j2.properties b/components/camel-opentracing/src/test/resources/log4j2.properties
deleted file mode 100644
index ae9e5300592..00000000000
--- a/components/camel-opentracing/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-appender.file.type=File
-appender.file.name=file
-appender.file.fileName=target/camel-opentracing-test.log
-appender.file.layout.type=PatternLayout
-appender.file.layout.pattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type=Console
-appender.out.name=out
-appender.out.layout.type=PatternLayout
-appender.out.layout.pattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-logger.opentracing.name=org.apache.camel.opentracing
-logger.opentracing.level=INFO
-rootLogger.level=INFO
-rootLogger.appenderRef.file.ref=file
diff --git a/components/camel-opentracing/src/test/resources/org/apache/camel/opentracing/OpenTracingSimpleRouteTest.xml b/components/camel-opentracing/src/test/resources/org/apache/camel/opentracing/OpenTracingSimpleRouteTest.xml
deleted file mode 100644
index ab190dc8178..00000000000
--- a/components/camel-opentracing/src/test/resources/org/apache/camel/opentracing/OpenTracingSimpleRouteTest.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- ">
-
- <bean id="mockTracer" class="io.opentracing.mock.MockTracer"/>
-
- <!-- setup opentracing tracer -->
- <bean id="ottracer" class="org.apache.camel.opentracing.OpenTracingTracer">
- <property name="tracer" ref="mockTracer"/>
- </bean>
-
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <route id="dude">
- <from uri="seda:dude"/>
- <log message="Routing at ${routeId}"/>
- <delay>
- <simple>${random(1000,2000)}</simple>
- </delay>
- <to uri="direct:car"/>
- </route>
- <route id="car">
- <from uri="direct:car"/>
- <log message="Routing at ${routeId}"/>
- <delay>
- <simple>${random(1000,2000)}</simple>
- </delay>
- </route>
- </camelContext>
-
-</beans>
diff --git a/components/camel-tracing/src/main/docs/tracing.adoc b/components/camel-tracing/src/main/docs/tracing.adoc
index a48903871b8..b31aa71441b 100644
--- a/components/camel-tracing/src/main/docs/tracing.adoc
+++ b/components/camel-tracing/src/main/docs/tracing.adoc
@@ -10,4 +10,4 @@
This module is common interfaces and API for distributed tracing.
-This module is not intended to be used by end users, but they should use `camel-opentelemetry` or `camel-opentracing` instead.
+This module is not intended to be used by end users, but they should use `camel-opentelemetry`.
diff --git a/components/pom.xml b/components/pom.xml
index 4c8390ac69a..4d3e8a1026c 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -237,7 +237,6 @@
<module>camel-olingo2</module>
<module>camel-olingo4</module>
<module>camel-openstack</module>
- <module>camel-opentracing</module>
<module>camel-opentelemetry</module>
<module>camel-optaplanner</module>
<module>camel-paho</module>
diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc
index 0013e29fbba..bbb31b59c75 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -35,7 +35,6 @@
** xref:microprofile-health.adoc[Microprofile Health]
** xref:openapi-java.adoc[Openapi Java]
** xref:opentelemetry.adoc[OpenTelemetry]
-** xref:opentracing.adoc[OpenTracing]
** xref:platform-http-vertx.adoc[Platform Http Vertx]
** xref:reactive-executor-tomcat.adoc[Reactive Executor Tomcat]
** xref:reactive-executor-vertx.adoc[Reactive Executor Vert.x]
diff --git a/parent/pom.xml b/parent/pom.xml
index 2903839a3eb..da62443c3ed 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -421,8 +421,6 @@
<openstack4j-version>3.10</openstack4j-version>
<opentelemetry-version>1.21.0</opentelemetry-version>
<opentelemetry-alpha-version>${opentelemetry-version}-alpha</opentelemetry-alpha-version>
- <opentracing-version>0.33.0</opentracing-version>
- <opentracing-tracerresolver-version>0.1.8</opentracing-tracerresolver-version>
<optaplanner-version>8.32.0.Final</optaplanner-version>
<os-maven-plugin-version>1.7.0</os-maven-plugin-version>
<paho-version>1.2.5</paho-version>
@@ -1954,11 +1952,6 @@
<artifactId>camel-opentelemetry</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-opentracing</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-optaplanner</artifactId>