Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ResponseOps][taskManager] add debug log message when task ends #131090

Closed
pmuellr opened this issue Apr 27, 2022 · 1 comment · Fixed by #131639
Closed

[ResponseOps][taskManager] add debug log message when task ends #131090

pmuellr opened this issue Apr 27, 2022 · 1 comment · Fixed by #131639
Assignees
Labels
enhancement New value added to drive a business result Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Apr 27, 2022

While dealing with a support issue, we got some Kibana logs with debug set on for task manager logging. Once nice thing is that it logs a message when tasks start:

[DEBUG][plugins.taskManager] Running task reports:monitor "reports:monitor"

However, it does NOT log a message when the task ends. It would be nice to have this as well.

An additional goodie would be to add some additional tag values to these messages, so we can filter on them in Discover/elsewhere. Thinking:

  • task:start on the start message
  • task:end on the end message

We could also be more elaborate, and add the task type and perhaps task id as tags. With newer Discovers, you can do some "popup aggs" on the term frequency of these, and then expand on that with full on Lens viz, which proved to be useful for the tagged event log delay messages, which we recently added:

const { eventLoopBlockMs = 0 } = taskTiming;
const taskLabel = `${this.taskType} ${this.instance.task.id}`;
if (eventLoopBlockMs > this.eventLoopDelayConfig.warn_threshold) {
this.logger.warn(
`event loop blocked for at least ${eventLoopBlockMs} ms while running task ${taskLabel}`,
{
tags: [this.taskType, taskLabel, 'event-loop-blocked'],
}
);
}

@pmuellr pmuellr added enhancement New value added to drive a business result Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 27, 2022
@elasticmachine
Copy link
Contributor

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

@mikecote mikecote moved this from Awaiting Triage to Todo in AppEx: ResponseOps - Execution & Connectors Apr 28, 2022
@ersin-erdal ersin-erdal self-assigned this May 5, 2022
Repository owner moved this from In Progress to Done in AppEx: ResponseOps - Execution & Connectors May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants