Skip to content

Emit matching_timeout outcome for Nexus matching dispatch errors#10325

Merged
bergundy merged 1 commit into
temporalio:mainfrom
bergundy:nexus-handler-matching-timeout-outcome
May 19, 2026
Merged

Emit matching_timeout outcome for Nexus matching dispatch errors#10325
bergundy merged 1 commit into
temporalio:mainfrom
bergundy:nexus-handler-matching-timeout-outcome

Conversation

@bergundy
Copy link
Copy Markdown
Member

When the matching client returns an error from DispatchNexusTask in StartOperation and CancelOperation, tag the metrics with outcome=matching_timeout instead of falling through to the default internal_error outcome. This lets us distinguish failures originating from the matching dispatch (typically transient timeouts) from other internal errors, which are considered more severe.

When the matching client returns an error from DispatchNexusTask in
StartOperation and CancelOperation, tag the metrics with
outcome=matching_timeout instead of falling through to the default
internal_error outcome. This lets us distinguish failures originating
from the matching dispatch (typically transient timeouts) from other
internal errors, which are considered more severe.
@bergundy bergundy requested review from a team as code owners May 19, 2026 15:47
Copy link
Copy Markdown
Contributor

@chrsmith chrsmith left a comment

Choose a reason for hiding this comment

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

This is totally fine as-is. But the tags seem kinda like magic numbers. Does it make sense to expose values from some shared metrics package, like:

...WithTags(metrics.MatchingTimeoutTag)

@bergundy
Copy link
Copy Markdown
Member Author

This is totally fine as-is. But the tags seem kinda like magic numbers. Does it make sense to expose values from some shared metrics package, like:

...WithTags(metrics.MatchingTimeoutTag)

I would be okay with following up with that in a different PR. I'm personally not a fan of defining constants for things that have limited reuse, I prefer not to have to jump around through the code to see the full picture but that's just a personal preference.

@bergundy bergundy merged commit dfbdd29 into temporalio:main May 19, 2026
48 checks passed
@bergundy bergundy deleted the nexus-handler-matching-timeout-outcome branch May 19, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants