Closed ersin-erdal closed 1 day ago
Errors are not shown in metrics when Elasticsearch returns an error when updating the task after execution.
Create an Always Firing rule.
Put the below code in the try block of TaskStore.bulkUpdate method to mimic processResultForRecurringTask
processResultForRecurringTask
const isProcessResult = docs.some( (doc) => doc.taskType === 'alerting:example.always-firing' && doc.status === 'idle' && doc.retryAt === null ); if (isProcessResult) { throw SavedObjectsErrorHelpers.decorateEsUnavailableError(new Error('test')); }
You can also use decorateGeneralError to test ES return 500 case.
decorateGeneralError
When above error is thrown, it should be reflected in metrics endpoint results.
Pinging @elastic/response-ops (Team:ResponseOps)
Errors are not shown in metrics when Elasticsearch returns an error when updating the task after execution.
To reproduce:
Create an Always Firing rule.
Put the below code in the try block of TaskStore.bulkUpdate method to mimic
processResultForRecurringTask
You can also use
decorateGeneralError
to test ES return 500 case.Expected behaviour:
When above error is thrown, it should be reflected in metrics endpoint results.
Definition of Done