GitHub user objectiser opened a pull request:
https://github.com/apache/camel/pull/1467
Camel OpenTracing support
Initial version of the OpenTracing support - I used the zipkin component as
a template.
Originally the `OpenTracingTracer` was a `StaticService` (as in the
`ZipkinTracer`) but found when running the unit test which loads the route from
xml, it didn't cause the service to be started (`doStart()`) so the event
notifier was not registered. If it is preferred to have this class as a static
service, then I will update the PR and we can explore solutions.
To enable different components to record additional tags/logs in the span
data, I've created a `SpanDecorator`. Added decorators for http and jetty
currently - for some reason the service2 (in the example) http.status field is
not captured because Exchange.hasOut() returns false - and if getOut() is
accessed (without checking `hasOut()`), it results in no result being returned
from the service.
Not sure if other component decorators should be created in this component,
or whether they should be created in their own component modules - but then
they would have a dependency on the OpenTracing artifact.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/objectiser/camel opentracing
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1467.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1467
----
commit f437d378476c796718580883375ddacc1c1df5ed
Author: Gary Brown <[email protected]>
Date: 2017-02-09T16:30:56Z
Camel OpenTracing support
Added decorators for http and jetty - for some reason the service2
http.status field is not captured because Exchange.hasOut() returns false - and
if getOut() is accessed, it results in no result being returned from the service
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---