Tracing indexing requests and search queries

Description

Provide support for creating "traces" during the execution of indexing and search queries, so that users can get collect that data and get insights into the behavior of their application ("what is taking so long?"/"which of my business operations are the most resource-intensive?"/...)

The hope is that it would replace Hibernate Search 5's JMX statistics support advantageously.

One challenge will be to forward the tracing context to background threads, since most indexing (and ES querying) is done in a different thread than the client thread.

Relevant: https://opentracing.io/

Environment

None

Activity

Show:
Yoann Rodière
January 6, 2021, 12:55 PM

Regarding the forwarding of tracing contexts to background threads, at least with opentracing it seems possible.

OpenTracing has a concept of “references” between spans. See https://opentracing.io/specification/

At the moment there are two types of references: “child of” (~ method call, the parent waits for the child span to finish) and “forwards” (~ notification, the parent doesn’t care about the child span).

Interestingly, it would seem that a given span can have multiple references of the same type. So hopefully, when a bulk request is created that groups multiple indexing requests from multiple threads, we will be able to create a new span that references spans from all these threads? That would fit our use case perfectly…

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major
Configure