-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add ActivityTracker to worker stats option #1362
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
Continue to review full report in Codecov by Sentry.
|
ec86220
to
cc6c739
Compare
cc6c739
to
d7346b6
Compare
return &activityStopperImpl{info: info, tracker: ati} | ||
} | ||
|
||
func (ati *activityTrackerImpl) Stats() Activities { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can group Activities by activityType or other fields of ActivityInfo if needed internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, but looks good
What changed?
This changes adds the ActivityTracker in the worker options. In this PR, to count and get information on running activities in a worker.
The activityTracker field is added to activityTaskHandler and localActivityTaskHandler and emitted upon calling Execute() ExecuteWithActualArgs() for local activity.
Why?
Want to retrieve running activities on a worker instance
How did you test it?
unit tests
local test
Potential risks
When deploying the noop implementation is used by default
potential risks include nil pointer dereference panics in the event that we missed initializing the activityTracker in a particular flow