How to use injectTraceHeaders?

Yes that is a Java Lambda Expression which require Java 8+

You can take a look at this sample repo that has a very simple example of how to use the HeaderInjector and HeaderExtractor framework.

You need to implement the

HeaderInjector

and the HeaderExtractor

It is up to you how you do that, in the message itself, in the header etc. This is just an example you probably want to do it more thoughtfully for production. This is an example with just raw TCP.

Note the Trace Timeline / Waterfall will probably not look correct in Elasticsearch 6.5.1 as there were fixes in Elasticsearch 7.2 for that visualization.

There is also this thread

1 Like