Skip to content

[Improvement-18039][Metrics] Add missing metrics for workflow and task state transitions#18038

Open
sanjana2505006 wants to merge 10 commits intoapache:devfrom
sanjana2505006:Improvement-Metrics
Open

[Improvement-18039][Metrics] Add missing metrics for workflow and task state transitions#18038
sanjana2505006 wants to merge 10 commits intoapache:devfrom
sanjana2505006:Improvement-Metrics

Conversation

@sanjana2505006
Copy link
Contributor

@sanjana2505006 sanjana2505006 commented Mar 9, 2026

Purpose

This PR adds missing metrics to the Master module to improve visibility into workflow and task execution states. It addresses the gap where several metrics classes were defined but not utilized in the core execution flow.

Proposed Changes

  • Added workflow instance state tracking in AbstractWorkflowStateAction.
  • Added granular task state tracking (dispatch, success, failure, kill, retry) in AbstractTaskStateAction.
  • Added task timeout metric tracking in TaskTimeoutLifecycleEventHandler.
  • Added workflow instance generation duration measurement in WorkflowExecutionRunnableFactory.

Verification

  • Verified code style with mvn spotless:apply.
  • Performed final code review to ensure metrics integration follows existing patterns.

This PR closes #18039

@github-actions github-actions bot removed the test label Mar 9, 2026
@sanjana2505006 sanjana2505006 changed the title [Improvement-Metrics][master] Add missing metrics for workflow and task state transitions [Improvement][master] Add missing metrics for workflow and task state transitions Mar 9, 2026
@sanjana2505006 sanjana2505006 changed the title [Improvement][master] Add missing metrics for workflow and task state transitions [Improvement] Add missing metrics for workflow and task state transitions Mar 9, 2026
@sanjana2505006 sanjana2505006 changed the title [Improvement] Add missing metrics for workflow and task state transitions [Improvement][master]Add missing metrics for workflow and task state transitions Mar 9, 2026
@sanjana2505006 sanjana2505006 changed the title [Improvement][master]Add missing metrics for workflow and task state transitions [Improvement][master] Add missing metrics for workflow and task state transitions Mar 9, 2026
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the pull request notice and create an issue first. @sanjana2505006

@sanjana2505006 sanjana2505006 changed the title [Improvement][master] Add missing metrics for workflow and task state transitions [Improvement-18039][Metrics] Add missing metrics for workflow and task state transitions Mar 9, 2026
@sanjana2505006
Copy link
Contributor Author

Thank you @SbloodyS , for the guidance! I've created the issue #18039 and updated the PR title and commit to reference it.

@sanjana2505006 sanjana2505006 requested a review from SbloodyS March 9, 2026 06:06
@SbloodyS SbloodyS added the improvement make more easy to user or prompt friendly label Mar 9, 2026
@SbloodyS SbloodyS added this to the 3.4.2 milestone Mar 9, 2026
@SbloodyS
Copy link
Member

Please check the failed CI. @sanjana2505006

@sanjana2505006
Copy link
Contributor Author

sanjana2505006 commented Mar 10, 2026

Sure, @SbloodyS, I have an exam today. I’ll take a look at the failed CI once I’m done 😃...

@sanjana2505006
Copy link
Contributor Author

Hello @SbloodyS, I've updated the PR to address the CI failures. Please have a look when you have time and share your feedback. Thank you!

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
23.4% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

…arQube coverage gate, and fix import style in WorkflowExecutionRunnableFactory
@github-actions github-actions bot added the test label Mar 11, 2026
@SbloodyS
Copy link
Member

UT still failed. @sanjana2505006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend improvement make more easy to user or prompt friendly test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Metrics] Add missing metrics to Master and Worker modules

2 participants