elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.9k stars 24.73k forks source link

ESQL: provide execution timing for async queries #110935

Open bpintea opened 3 months ago

bpintea commented 3 months ago

Description

Both the sync (POST _query) and async (POST _query/async) APIs provide timing information into a Took-nanos HTTP header, informing the user of long it took to answer. For sync queries this information conveys how long it took to generate the complete response to user's query. For async ones, this is the timing required to start execution, plus any wait_for_completion_timeout timing the user provided. If the query doesn't finish within this waiting time, it'll continue running as an Elasticsearch task and the user won't know exactly how long it took for the query to finish: this details isn't returned anywhere by a get call (GET _query/async/<ID>): neither as a header, nor as a field in the response object.

This issue is to track making this async total execution timing available.

elasticsearchmachine commented 3 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)

elasticsearchmachine commented 3 weeks ago

Pinging @elastic/kibana-esql (ES|QL-ui)