Skip to content

Conversation

@mjq
Copy link
Member

@mjq mjq commented Sep 9, 2025

Currently, OTLP's ERROR status (2) and SpanV2's error status are mapped to the SpanV1 status unknown. Since an error status means you definitely had an error, the unknown status ("We do not know whether the transaction failed or succeeded") does not seem appropriate.

The closest candidate for a generic error in SpanV1's status enum is internal_error. Update the V2 to V1 mapping to use that instead.

Currently, OTLP's `ERROR` status (`2`) and SpanV2's `error` status are mapped
to the SpanV1 status `unknown`. Since an `error` status means you definitely
had an error, the `unknown` status ("We do not know whether the transaction
failed or succeeded") does not seem appropriate.

The closest candidate for a generic error in SpanV1's status enum is
`internal_error`. Update the V2 to V1 mapping to use that instead.
@mjq mjq requested a review from a team as a code owner September 9, 2025 16:45
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@mjq mjq changed the title fix(spanv2): map error status to internal_error fix(spanv2): Map error status to internal_error Sep 9, 2025
@mjq mjq enabled auto-merge September 9, 2025 17:25
@mjq mjq added this pull request to the merge queue Sep 9, 2025
Merged via the queue into master with commit 05fa2fd Sep 9, 2025
28 of 29 checks passed
@mjq mjq deleted the mjq/update-otel-error-mapping branch September 9, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants