-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat(async_work): add async work duration and panic metrics #458
Conversation
@@ -116,6 +116,17 @@ func (aws *AsyncWorkers) handleWork(ctx context.Context, workName string, work * | |||
defer func() { | |||
if r := recover(); r != nil { | |||
handleErr = fmt.Errorf("recover from %v", r) | |||
|
|||
metricErr := EmitCustomizedAsyncedMetrics(ctx, |
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.
will workName always be a valid metric-name? will it contain some non-supported characters?
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.
In addition to existing EmitAsyncedMetrics, I add another function EmitCustomizedAsyncedMetrics in this pr. And it accepts metric name as parameter. I use specified metric "name async_work_duration_ms" and "async_work_panic" in this pr and they are both valid names.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #458 +/- ##
==========================================
- Coverage 54.80% 54.78% -0.02%
==========================================
Files 499 499
Lines 54534 54571 +37
==========================================
+ Hits 29888 29898 +10
- Misses 21419 21441 +22
- Partials 3227 3232 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
feat(async_work): add async work duration and panic metrics