sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Document that binding transaction to the scope is required to connect spans and errors

Open marandaneto opened this issue 4 years ago • 6 comments

Similar to Android/Java https://docs.sentry.io/platforms/android/performance/instrumentation/custom-instrumentation/#connect-errors-with-spans

marandaneto avatar Sep 10 '21 06:09 marandaneto

Possibly a dupe of: https://github.com/getsentry/sentry-cocoa/issues/990 which was closed as implemented through #1065

bruno-garcia avatar Sep 10 '21 13:09 bruno-garcia

only if the transaction is set in the scope, not calling setThrowable which makes sense as exceptions are not used in Swift/ObjC, but we'r missing docs then

marandaneto avatar Sep 10 '21 13:09 marandaneto

The equivalent here would be: Can we connect a crash event with a transaction if one was bound to the scope? That would be very valuable. The transaction could be sent after restart too if that made sense but couldn't be added to the same envelope as the crash event

bruno-garcia avatar Sep 10 '21 14:09 bruno-garcia

@bruno-garcia that would be a nice feature but it'd require changes, we'd need to find a way on how to track all the "manual" transactions so we can finish em all when there's a hard crash, obviously it's easier for automatic transactions, but that's rather a different issue, this one is only about the missing docs

marandaneto avatar Sep 13 '21 05:09 marandaneto

For reference: https://github.com/getsentry/sentry-docs/issues/4153

bruno-garcia avatar Sep 15 '21 14:09 bruno-garcia

https://docs.sentry.io/platforms/apple/performance/instrumentation/custom-instrumentation/#create-transaction-bound-to-the-current-scope should mention this.

philipphofmann avatar Apr 06 '22 13:04 philipphofmann

Documentation updated at https://github.com/getsentry/sentry-docs/pull/6570

brustolin avatar Apr 05 '23 15:04 brustolin