-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Avoid allocating too much memory, sampling logic is not re-applied #13015
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
Conversation
34a3560
to
fb487ec
Compare
c320e21
to
fc5c33f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13015 +/- ##
==========================================
- Coverage 91.62% 91.51% -0.11%
==========================================
Files 504 504
Lines 27888 28156 +268
==========================================
+ Hits 25553 25768 +215
- Misses 1844 1877 +33
- Partials 491 511 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Do you have a memory profile from this branch to compare? |
I manually tested that the NewSamplerWithOptions is calling only once per service compare to previously once per component. |
I believe this change would mean that sampling is only applied to console logs, not logs exported through OTLP. So I don't think this is the right solution. |
The issue is that:
I can see a few solutions:
|
Signed-off-by: Bogdan Drutu <[email protected]>
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.
As a quick fix for the stdout-only case, this looks good to me. I would recommend making the release note a bit more explicit, and not marking the issue as entirely fixed by this PR.
Co-authored-by: Jade Guiton <[email protected]>
8991b48
Description
Avoid re-creating sampler counters every time we wrap with attributes.
Link to tracking issue
Updates #13014
Testing
Documentation