develop icon indicating copy to clipboard operation
develop copied to clipboard

Simplify list of known SpanStatus

Open rhcarvalho opened this issue 4 years ago • 2 comments

We currently have a long list of span statuses. Those were inherited from an old, pre-1.0, version of the OpenTelemetry specification.

OpenTelemetry moved on to drastically simplify SpanStatus following OTEP 136.

[...] an existing set of error types without first clearly defining their use and how they might be set has caused confusion.

The extensive list of statuses, without a clear mapping and dubious use across platforms we support (browser, desktop, mobile, web servers, etc), has caused confusion in Sentry too, both for SDK maintainers and end users. For example:

  • https://github.com/getsentry/develop/issues/307
  • Users confused if a span marked as "internal error" means an error in Sentry or in the SDK or in their own code

This issue tracks re-aligning with OpenTelemetry, what means today replacing the existing statuses with:

  • Unset (default)
  • Ok
  • Error

See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status for details.

rhcarvalho avatar Jul 22 '21 10:07 rhcarvalho

FYI @mitsuhiko @jan-auer @bruno-garcia @AbhiPrasad @lobsterkatie

rhcarvalho avatar Jul 22 '21 10:07 rhcarvalho

I replied with all possible emojis:

image

The HTTP-based status seem odd. And have not been documented in terms of what's expected in different cases so SDKs behave very differently regarding what status is used and when.

Unset (default): Great. Often integrations have no opinion about the "outcome" of the span other than name and timing. UI can be less opinionated about "success or failure".

Ok and Error are pretty obvious and work for Mobile, Browser, Desktop, Web Server, background jobs, CLI tools, games, etc.

bruno-garcia avatar Jul 26 '21 23:07 bruno-garcia