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
I am also in favor of the 2nd option, as having too many APIs would make everything more complex to use (as you need to think of even more different APIs which do quite similar things).
With this PR, you can now pass a `parentSpan` optionally to `startSpan*`
APIs to create a span as a child of a specific span:
```js
const span = Sentry.startInactiveSpan({ name: 'xxx', parentSpan: parent });
Sentry.startSpan({ name: 'xxx', parentSpan: parent }, () => {});
Sentry.startSpanManual({ name: 'xxx', parentSpan: parent }, () => {});
```
With this, it should be easier to understand how you can manually work
with spans in v8.
Closes#12539
ref #12566, which I
noticed while working on this. For now I just cast the span which should
be fine, but is not ideal.
It is possible today, with the new APIs, to create a span as a child of a specific other span:
However, this is not super intuitive for users. We should provide some helper/utility/way to do this easier.
I see two main ways we could do this:
Sentry.startInactiveChildSpan(parent, spanOptions)
parentSpan
option to allstartSpan*
methods:I think I'd tend to the second option, and we should be able to implement this both for core as well as for otel.
The text was updated successfully, but these errors were encountered: