You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Init sentry (browser) as decribed in the doc. The parentSpanIsAlwaysRootSpan will be set true by default, see details here.
In application code, start a span with specific parent span (by options.parentSpan). For example:
constparentSpan={/** Some existed span */}constchildSpan=Sentry.startInactiveSpan({ parentSpan })childSpan.end()
Expected Result
We expect the childSpan to use parentSpan as its parent.
Actual Result
The childSpan uses the root span as its parent.
I think it's a bug because if the user do specify some parentSpan, it means he is clear about the hierarchy structure here and is intended to construct a parent-child relationship. The parentSpanIsAlwaysRootSpan, which I expect to act as a global default behavior, makes it impossible.
Activity
mydea commentedon Jun 30, 2025
Hey, thanks for writing in. I think this makes sense, I'll see if I can adjust this easily.
fix(browser): Ensure explicit `parentSpan` is considered (#16776)
github-actions commentedon Jul 4, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #16776, which was included in the 9.35.0 release.