elastic / kibana

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

[ResponseOps] improve error logging for Slack webhook #169178

Open pmuellr opened 11 months ago

pmuellr commented 11 months ago

We are seeing some errors logged from the Slack webhook connector, that don't provide much information, but should.

Here's a snippet of code where most of this is taking place:

https://github.com/elastic/kibana/blob/2932b77eec59bcb923814009d2904070f401e4de/x-pack/plugins/stack_connectors/server/connector_types/slack/index.ts#L158-L199

In our case, we could see from the log message that the retryResult() function was invoked, as it logged a unique message. However, that could have come from an HTTP response of 429 (but with no retry header) or >= 500.

We should also look to see if there's a way to provide some indicator in the event log - it may be enough to ensure the event log message also includes the information we'll be logging.

elasticmachine commented 11 months ago

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