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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit eb17501cadf5716edeade4c25df0972d527b0375
Author: Jose Montoya <[email protected]>
AuthorDate: Wed Jul 8 20:23:50 2020 -0500

    Adds docs
---
 .../src/main/docs/opentracing.adoc                 | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/components/camel-opentracing/src/main/docs/opentracing.adoc 
b/components/camel-opentracing/src/main/docs/opentracing.adoc
index baf2ad9..7bd4cc1 100644
--- a/components/camel-opentracing/src/main/docs/opentracing.adoc
+++ b/components/camel-opentracing/src/main/docs/opentracing.adoc
@@ -104,3 +104,32 @@ You can find an example demonstrating the three ways to 
configure OpenTracing he
 
https://github.com/apache/camel-spring-boot-examples/tree/master/camel-example-spring-boot-opentracing[camel-example-spring-boot-opentracing]
 
 include::camel-spring-boot::page$opentracing-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"

Reply via email to