Skip to content

Span.setStatus not applied to spans/transactions.Β #17808

@rodolfoBee

Description

@rodolfoBee

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

10.15.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

Create manual spans or edit current spans as follows:

// Status codes:
// 0: unknown
// 1: ok
// 2: error
const span0 = Sentry.startInactiveSpan({ name: "SpanWithUnknownStatus" });
span0.setStatus({ status: 0 });
span0.end();

const span1 = Sentry.startInactiveSpan({ name: "SpanWithOkStatus" });
span1.setStatus({ status: 1 });
span1.end();

const span2 = Sentry.startInactiveSpan({ name: "SpanWithErrorStatus" });
span2.setStatus({ status: 2 });

span2.end();

https://docs.sentry.io/platforms/javascript/tracing/instrumentation/#updating-the-span-status

Expected Result

The spans in Sentry have the corresponding status.

Actual Result

All spans have status set to "Unknown" as in the screenshot. The same is visible in the spans attributes in the trace details.

Image

The payload sent to sentry has the following: status:"unknown_error" for all spans.

Additional Context

Tip: React with πŸ‘ to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions