-
Notifications
You must be signed in to change notification settings - Fork 242
feat: Experimental Trace Metric #1116
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1116 +/- ##
==========================================
- Coverage 86.67% 82.91% -3.77%
==========================================
Files 60 63 +3
Lines 6964 5829 -1135
==========================================
- Hits 6036 4833 -1203
- Misses 743 806 +63
- Partials 185 190 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
| if client.batchMeter != nil { | ||
| client.batchMeter.Flush(ctx.Done()) | ||
| } |
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.
Bug: Goroutine Leak in Client Close
The Client.Close() method doesn't call Shutdown() on batchMeter (or batchLogger), causing goroutine leaks. The BatchMeter.run() goroutine will continue running indefinitely even after the client is closed, as it only stops when the context is cancelled. The Shutdown() method should be called to properly cancel the context and wait for the goroutine to finish, similar to how Flush() calls both batchLogger.Flush() and batchMeter.Flush().
Important
This will never get merged. This is a proof of concept on my end, and it works. This should be reworked if this (#1107) got merged.
If you want to use this, go set this on your
go.mod:On your
sentry.Initcall:Then use it:
Description
Implement trace metric based on getsentry/sentry-docs#15178
This work is based on the batch logger made by Giannis. Minimal documentation to really emphasize how experimental this is.
Issues
Reminders
feat:,fix:,ref:,meta:)