Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Available as of Camel 2.18 The The mapping can be configured using:
For both kinds you can use wildcards and regular expressions to match, which is using the rules from Intercept. To match all Camel messages you can use Camel will auto-configure a
This makes it easy to use OptionsYou can configure the following options on
ExampleTo enable ZipkinTracer zipkin = new ZipkinTracer(); // Configure the scribe span collector with the hostname and port for the Zipkin Collector Server zipkin.setSpanCollector(new ScribeSpanCollector("192.168.90.100", 9410); // ...then add zipkin to the CamelContext zipkin.init(camelContext); The configuration about will the trace all incoming and outgoing messages in Camel routes. To use <!-- configure the scribe span collector with the hostname and port for the Zipkin Collector Server --> <bean id="scribe" class="com.github.kristofa.brave.scribe.ScribeSpanCollector"> <constructor-arg index="0" value="192.168.90.100"/> <constructor-arg index="1" value="9410"/> </bean> <!-- setup zipkin tracer --> <bean id="zipkinTracer" class="org.apache.camel.zipkin.ZipkinTracer"> <property name="serviceName" value="dude"/> <property name="spanCollector" ref="scribe"/> </bean> ServiceNameHowever if you want to map Camel endpoints to human friendly logical names, you can add mappings
You can configure a global service name that all events will fallback and use, such as: zipkin.setServiceName("invoices"); This will use the same service name for all incoming and outgoing Zipkin traces. So if your application uses different services, you need to map them more fine grained into client vs server mappings Client and Server Service Mappings
So if your application hosts a service that others can call, you can map the Camel route endpoint to a server service mapping. For example support your Camel application has the following route from("activemq:queue:inbox") ... .to("http:someserver/somepath"); And you want to make that as a server service, you can add the following mapping zipkin.addServerServiceMapping("activemq:queue:inbox", "orders"); Then when a message is consumed from that inbox queue, it becomes a Zipkin server event with the service name orders. Now suppose that the call to http:someserver/somepath is also a service, which you want to map to a client service name, which can be done as: zipkin.addClientServiceMapping("http:someserver/somepath", "audit"); Then in the same Camel application you have mapped incoming and outgoing endpoints to different zipkin service names. You can use wildcards in the service mapping, so to match all outgoing calls the same HTTP server you can do zipkin.addClientServiceMapping("http:someserver*", "audit"); Mapping rulesThe service name mapping for server occurs using the following rules
The service name mapping for client occurs using the following rules
No client or server mappingsIf there has been no configuration of client or server service mappings, then So in the example above that would mean the service names would be, as if you add the following code yourself: zipkin.addServerServiceMapping("activemq:queue:inbox", "activemq:queue:inbox"); zipkin.addClientServiceMapping("http:someserver/somepath", "http:someserver/somepath"); This is not a recommended approach but gets you up and running quickly without doing any service name mappings. However when you have multiple systems across your infrastructure, then you should consider using human logic service names, that you map to instead of using the camel endpoint URIs. camel-zipkin-starterIf you are using Spring Boot then you can add the You can find an example of this in the camel-example-zipkin |