Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
9.31.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
-
Init sentry (browser) as decribed in the doc. The
parentSpanIsAlwaysRootSpan
will be settrue
by default, see details here. -
In application code, start a span with specific parent span (by
options.parentSpan
). For example:const parentSpan = { /** Some existed span */ } const childSpan = 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.
Metadata
Metadata
Assignees
Type
Projects
Status
No status