-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Continue Trace but with existing transaction #4021
Comments
Hi @m-kovac ,
I don't entirely follow what you're trying to do (it seems like a complex scenario), but if you want to create a transaction with a traceid or a spanid that you know ahead of time, you can create the transaction context manually using this overload: sentry-dotnet/src/Sentry/TransactionContext.cs Lines 22 to 33 in 7e12c2b
|
Our scenario is different, more like A->B->A->C. This should be distributed trace, so the arrow represents parent->child relationship between spans. All those apps have tracing enabled. Yes It's complex scenario, we would like to figure out. Thanks for pointing the |
I see that the |
Transactions are basically "spans with no parent" so you can't have a transaction that's a child of another transaction. You can start/build two transactions at the same time. For example you could do (pseudo-code):
Multiple transactions can be tied together as part of a single "Trace" however (typically in distributed applications). It sounds like this is what you want to do. In that case you can have
And all of that would be collected in a single trace in Sentry. Is the WPF application creating the first transaction? And then you want each of the WebView's to start other transactions that you want to see on the same "Trace"? And so is your question how to propagate the trace information from the WPF application to the various WebViews? |
Problem Statement
TL;DR We want to continue trace in the desktop WPF application with
sentry-header
received from embedded application but with existing transaction already present.This WPF application is embedding chromium webview. We are creating global transaction that is alive during the lifetime of WPF application and one or more spans that represents the instance - there can be more than one instance of the embedded chromium. When the webview is starting, it will receive the
traceId
andspanId
of the parent span which is then continued in different methods withcontinueTrace
. User can e.g. log in in the chromium. This will produce span in web app and sends thetraceId
andspanId
as parameters to login method back in the WPF application. We want to continue that particular span produced in the web application back in the WPF app. This appears to be currently not possible.Solution Brainstorm
Currently we tried to use the
ContinueTrace
API as documented here. But this produces no span in Sentry in our case. We suspect that this has something to do with creating concurrent transaction.The continued trace is not sampled.
We would expect similar API as in JS
The text was updated successfully, but these errors were encountered: