-
-
Notifications
You must be signed in to change notification settings - Fork 220
Sampling based Transaction.NoOp
to easy memory pressure
#3636
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
Comments
Thanks for creating this, we've had to slow down our Sentry adoption on some high throughput API's due to the overhead causing OOM in Kubernetes, reducing the sampling rate wasn't effective at curbing the overhead of adding sentry. Which this ticket targets directly |
Came up on HN: https://news.ycombinator.com/item?id=43726926 We should be able to return the noop singleton when a transaction isn't sampled. |
Not quite... we still have to propagate headers. This has been implemented (not using a singleton) in: We could revive that PR... |
@jamescrosswell it's quite impactful to server loads that have tons of transactions objevts being created even though sample rates are low |
What
Came up in #3581 (comment)
It does not matter whether a transaction gets sampled or not, they still require the same amount of resources - i.e. memory.
How
We could expand on this on the NoOp. Instead of a
NoOpTransaction
singleton we could pass around something like aSampledTransaction
that are functionally NoOp but hold the data required to provide a client report - i.e. span count. I guess the same could work for spans? That way we'd get rid of all the data we know will get discarded in the end anyway.Context
We introduced the NoOp transaction with the SDK disabled here: https://github.com/getsentry/sentry-dotnet/pull/3581/files and we could expand on this.
When starting a
transaction
it either has its sampling decision already set or it goes through theTracesSampler
(if provided)sentry-dotnet/src/Sentry/Internal/Hub.cs
Lines 149 to 153 in 12c7d7c
or it gets it's sampling state set randomly
sentry-dotnet/src/Sentry/Internal/Hub.cs
Line 162 in 12c7d7c
So we know right from the beginning if a transaction ends up in a client report or not.
The text was updated successfully, but these errors were encountered: