Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 349. Zipkin Component
Available as of Camel 2.18
The camel-zipkin component is used for tracing and timing incoming and outgoing Camel messages using zipkin.
Events (span) are captured for incoming and outgoing messages being sent to/from Camel.
camel-zipkin is planned to be refactored in Camel 2.22.0 to not use zipkin-scribe but use the default http transport. This work may cause backwards incompatibility.
This means you need to configure which Camel endpoints map to zipkin service names.
The mapping can be configured using:
- route id - A Camel route id
- endpoint url - A Camel endpoint url
For both kinds you can match using wildcards and regular expressions, using the rules from Intercept.
To match all Camel messages you can use * in the pattern and configure that to the same service name.
If no mapping has been configured, Camel will fallback and use endpoint uri’s as service names.
However, it’s recommended to configure service mappings so you can use human-readable names instead of Camel endpoint uris in the names.
Camel will auto-configure a span reporter one hasn’t been explicitly configured, and if the hostname and port to a zipkin collector has been configured as environment variables
- ZIPKIN_COLLECTOR_HTTP_SERVICE_HOST - The http hostname
- ZIPKIN_COLLECTOR_HTTP_SERVICE_PORT - The port number
or
- ZIPKIN_COLLECTOR_THRIFT_SERVICE_HOST - The Scribe (Thrift RPC) hostname
- ZIPKIN_COLLECTOR_THRIFT_SERVICE_PORT - The port number
This makes it easy to use camel-zipkin in container platforms where the platform can run your application in a linux container where service configurations are provided as environment variables.