elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.12k forks source link

Some errors in the mget task claiming strategy are not reflected in the task manager metrics #190082

Closed mikecote closed 1 week ago

mikecote commented 1 month ago

I noticed a few places within the mget task claiming code we log warnings whenever an error is thrown but they are not bubbled up to the serverless metrics

  1. https://github.com/elastic/kibana/blob/5bce919cf11c618057093940157ca35e95fc4eb0/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L196
  2. https://github.com/elastic/kibana/blob/5bce919cf11c618057093940157ca35e95fc4eb0/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L209
  3. https://github.com/elastic/kibana/blob/5bce919cf11c618057093940157ca35e95fc4eb0/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L203
  4. https://github.com/elastic/kibana/blob/5bce919cf11c618057093940157ca35e95fc4eb0/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L229
  5. https://github.com/elastic/kibana/blob/5bce919cf11c618057093940157ca35e95fc4eb0/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L236
  6. Potentially other logger.warn messages

Definition of Done

elasticmachine commented 1 month ago

Pinging @elastic/response-ops (Team:ResponseOps)

mikecote commented 1 month ago

Perhaps they should also be logged as errors?

ymao1 commented 3 weeks ago

Even with the default task claimer, the task claim metrics only capture whether an entire claim cycle succeeded or failed, not the metrics for the individual tasks in a claim cycle. Is this something new we want to add to the metrics?