-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update to Sentry v8 SDKs #234
base: master
Are you sure you want to change the base?
Conversation
|
Just updated this to v8.0.0 stable! |
Hi @robertcepa, I would love to get this reviewed to update my project. Thanks! |
Thank you @timfish for contributing! I took the first pass and left some comments for you.
Not a new issue. I think it's fine to roll with this for now.
Seems WeakMap has built-in garbage collection for expired keys so no concerns in terms of ever-growing memory as well, but would be cool to test how it does at scale. For now we don't officially support |
Sentry ideally want to keep the metrics aggregator instance count to a minimum so metrics are actually aggregated between requests. I think to make it scale you'd want a single aggregator per "worker instance" but you'd need a way to flush/send metrics before the worker instance exits. |
Closes #232 and closes #221
This PR updates the Sentry SDKs to v8.0.0-rc.2 which involves some breaking changes:
Transaction
integration since it's no longer requiredToucan
now extendsScope
withScope
now clones theToucan
class which is passed as the callback parameterwithScope
handling is a lot more complex because it has to consider isolationwithScope
tests to usetoStrictEqual
onextra
because they were passing when they should have been failingThe main thing I'm not that happy with is that
Toucan
holds a reference toToucanClient
(due to Sentry's own client ref inScope
) andToucanClient
holds a reference toToucan
(#sdk
) . This circular reference is unfortunate and there may be a way to improve this but I haven't put much thought into it yet and it might not be a massive issue 🙂It should be relatively easy to get Sentry Metrics working too but they do use a global to store a metrics aggregator per client (
WeakMap<Client, MetricsAggregatorInterface>
). I can't imagine this would be too much of an issue since it stores a unique metrics aggregator per client andtoucan-js
has a unique client per request.