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
startTransaction creates a transaction, but getActiveTransaction returns undefined: leads to no sentry-trace header #5063
Comments
Hi @slaesh, thanks for writing in. I remember coming across a similar problem some time ago so let's see if we can find something here. Just as a heads-up, we're currently actively working on v7 of our JS SDKs (see #4882) which means that it might take a little longer than usual to get to the bottom of this. I just have a few questions:
|
thanks @Lms24, that's fine. thanks for your quick reply though! it does not block us currently, but would make our lives easier to have this distributed tracing (automatically, not by hand).. so, yeah both packages are installed. imports are used from the angular package: angular 13.3.4 is used some more insights: I debuged through the code.. the do we need to specify something special while "starting" the transaction? I will come back with some more results using the 7-beta.0 👍 |
with the v7 its not working either.. the only requests where it works are the |
Hi @slaesh , thanks for getting back to me with the information. I think I know what might be causing Sentry.getCurrentHub().configureScope(scope => scope.setSpan(transaction)); This should be enough to get the active transaction and to again add the |
thanks! sounds promising! guess I totally misunderstood the "automatic instrumentation" .. 🙈 |
works fine! just wrote a little wrapper 👍 this here made me think it is done automatically somehow: https://docs.sentry.io/platforms/javascript/performance/instrumentation/automatic-instrumentation/#tracingorigins
thanks @Lms24 ! |
I had this same issue. The same sentence that @slaesh mentioned made me think it's done automatically. IMHO it would be great to add it into the doc when describing how |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/angular
SDK Version
6.19.7
Framework Version
6.19.7
Link to Sentry event
No response
Steps to Reproduce
browsertracing settings:
the actual call:
Expected Result
sentry-trace
header setActual Result
sentry-trace
headerThe text was updated successfully, but these errors were encountered: