As a part of making our API production-ready, we need to avoid any possible functions that may hang during request execution.
One of these places is the es.Search() function that is taking a default context at the moment. We need to set the maximum execution time for this and any \ similar functions, to avoid request hanging.
Acceptance criteria:
- esClient.Search() is using TimedOut context (context.WithTimeout) with configurable timeout
- One parameter added to configure this timeout
- Ideally, context can be added to the LogsProvided interface as a first parameter
- If the context timed out, we should send an error back to the client.