Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was changed
Add
retry_policy
toactivity.Info
class.My understanding is that the information already comes in the proto message and the only downside is 'from_proto' call + memory.
Why?
We have had an increasingly common request to provide monitoring and alerting only on the final activity failure.
As it stands - the existing activity failure metric is reported on each attempt with no information to determine whether the failure is 'final'.
Note: While it is in theory possible to make a workflow interceptor - we would like the metric to be attributed to the actual activity service worker. It makes it easier to, for example, implement automated canary testing for the activity worker service that only uses final failure metrics.
We are also not able to take the approach of 'pass this info in activity args' since we want a framework centric approach.
Checklist
Closes
How was this tested:
Unit tests passed locally
TBD
Any docs updates needed?
IDEs should reflect the change automatically on upgrade