Evaluate `SpanStatus` against the sentry.status convention

未关闭
#1,401 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
活跃
技术栈
rust

调研方向

Start by reading the SpanStatus documentation linked in the issue, then compare it with the span protocol specification and Relay’s v1 and v2 status handling in the referenced files. The issue asks for a design decision across transaction serialization, future span-first support, and integrations such as Actix, Tower, and OpenTelemetry. Done means resolving those questions and documenting the chosen compatibility approach.

由索引模型根据 Issue 内容生成。

描述

Spans Task Traces

The sentry.status convention allows only "ok" and "error", and marks more specific errors set by older SDKs as deprecated. SpanStatus still uses the older set of 17 statuses (not_found, internal_error, ...) and has no error variant. Evaluate how SpanStatus should relate to the convention. This was split out of #1399, which only touches the sentry-tracing field.

Context from Relay and the conventions:

  • The two-value status belongs to the span-first (v2) protocol. Relay's SpanV2Status (ok, error, plus a catch-all variant) was added in getsentry/relay#4717 (2025-05-14) as a subset of the OTel statuses. A review thread there removed unset from that set.
  • Relay still parses the transaction/v1 status with the legacy enum in relay-base-schema/src/spans.rs. That enum accepts the 17 statuses plus the aliases success, failure and unknown_error, but rejects "error". Its comment says it's stored as a u8 in Snuba/ClickHouse.
  • Relay converts v1 spans to v2 by mapping ok to ok and every other status to error (relay-spans/src/v1_to_v2.rs, added in getsentry/relay#5139).
  • The convention was added in getsentry/sentry-conventions#453 (2026-06-26). It describes sentry.status as set during ingestion: v2 spans can only be ok or error, while v1 spans have the longer list.
  • The span-first SDK spec sets the span status to either "ok" or "error", and setStatus accepts 'ok' | 'error' (develop docs).

Open questions:

  • Should SpanStatus change while the SDK sends transactions, given that Relay's transaction parser rejects "error"?
  • How should this tie in with span-first support in the Rust SDK?
  • How should the existing variants and the integrations that set them (Actix, Tower, OpenTelemetry) be handled?

References #1398

via @szokeasaurusrex.

--

View Session [Sentry]

主要语言
Rust
星标
754
派生
192
平均合并
2 天 20 小时
30 天内合并 PR
21

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/sentry-rust 的其他 Issue

查看 getsentry/sentry-rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。