Description
When searches are causing high CPU load, it's common to consult hot_threads
to find the source of expensive searches. Working backwards to the source can be difficult, as it requires detailed knowledge of how searches are executed, often at the Lucene level.
We support a special header X-Opaque-Id
that allows clients to tag a request with context information. Kibana is currently working on passing X-Opaque-Id
on all search requests, to surface the application and component that initiated the request (elastic/kibana#101587). The header is already included in search slow logs and tasks output. Could we also add it to hot_threads
to help debug the source of expensive queries?
Note: I'm not familiar with the hot_threads
implementation and am not sure how feasible this actually is.