-
-
Notifications
You must be signed in to change notification settings - Fork 268
Fix: Do not throw when Throwable type is not supported for associating errors to a transaction #692
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
…g errors to a transaction
} catch (exception, stackTrace) { | ||
_options.logger( | ||
SentryLevel.info, | ||
'Throwable type: ${throwable.runtimeType} is not supported for associating errors to a transaction.', |
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.
Maybe this should point to the docs, which says which types are not supported? Or maybe include the list of unspported types?
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.
throwable.runtimeType
does the job for now, but indeed a better logging message here would be awesome, I will merge and release for now because it's a bug and later improve it.
@@ -31,7 +31,7 @@ class Hub { | |||
|
|||
late SentryTracesSampler _tracesSampler; | |||
|
|||
final _WeakMap _throwableToSpan = _WeakMap(); | |||
late final _WeakMap _throwableToSpan; |
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.
Also FYI: Starting with Dart 2.17 there's a WeakReference.
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 take some time, thanks for pointing out o/
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.
LGTM
`Instructions and example for changelog`$
To the changelog entry, please add a link to this PR (consider a more descriptive message):` - Do not throw when Throwable type is not supported for associating errors to a transaction(#692)
|
📜 Description
Fix: Do not throw when Throwable type is not supported for associating errors to a transaction
💡 Motivation and Context
Fixes #680
💚 How did you test it?
📝 Checklist
🔮 Next steps