Trace calls between ES nodes with opentracing

We are using ElasticSearch with cross-cluster search. I was wondering if there was a way to have the trace-id propagated across the various ES nodes targeted to be able to build a flamegraph of the various calls made between nodes. Is there a plugin doing that? We are using the TransportClient on our client side with an opentracing library.

The X-Opaque-Id header seems to be roughly what you are looking for: it is a user-supplied ID that is propagated between nodes as part of a request, and is exposed by the tasks API.

Maybe I am not understanding correctly, but this would not build new spans every time the request coming from a given trace would hit an ES node, right?

The notion of a task in Elasticsearch is pretty much what I think you are calling a span, and yes you get a new one each time a request passes between two nodes (and also often when a request moves from one phase to another within the same node).

Extracting the tasks (i.e. spans) in a usable form is perhaps the hardest part of what you're asking. There doesn't look to be a way to do that, even via a plugin, today.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.