Skip to content
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

Trace transactions across isolates #721

Closed
blaugold opened this issue Jan 26, 2022 · 4 comments
Closed

Trace transactions across isolates #721

blaugold opened this issue Jan 26, 2022 · 4 comments

Comments

@blaugold
Copy link
Contributor

This is a feature that is relevant to Dart and Flutter apps.

I would like to have the ability to trace transactions that perform some work in another isolate and therefore create child spans in that second isolate.

The TimelineTask from dart:developer for example can be used to track tasks that have child tasks in multiple isolates.

@marandaneto
Copy link
Contributor

Indeed, for now, there's a workaround.

// your span Isolate A
final header = spanIsolateA.toSentryTrace()

// pass header to Isolate B
You can use the final spanIsolateB = Sentry.startTransactionWithContext(SentryTransactionContext.fromSentryTrace(header)).

So you are able to continue a transaction from different contexts, that's used for Frontend and Backend stuff, but it works.

@blaugold
Copy link
Contributor Author

@marandaneto
Thanks for that workaround!

@marandaneto marandaneto moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Mar 3, 2022
@marandaneto
Copy link
Contributor

We'll do an investigation on how this class Timeline task works and how we could use that to our benefit.
Users could benefit from creating fine-grained spans out of the given transaction/span.
We'll write an update as soon as we come to it.

@marandaneto
Copy link
Contributor

Closing it in favor of #1343
Not really the very same thing but the very same symptom.
I believe we can address both together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants