Skip to content

Conversation

@bpholt
Copy link
Member

@bpholt bpholt commented Jul 28, 2025

I think it's misleading to record canceled spans using StatusCode.UNSET. The spec says

The default value is Unset. A span status that is Unset means that the operation it tracked successfully completed without an error.

but a canceled span did not successfully complete. There's no canceled status in the spec, so I think StatusCode.ERROR is the more appropriate choice.

This came up as I was looking at some trace data this afternoon and initially thought a bunch of parallel operations succeeded, with only one failure. Only after more investigation did I realize that the failure actually resulted in the other operations being canceled; none of them actually completed successfully. This would have been immediately obvious if the canceled operations had the Error status set.

@bpholt bpholt force-pushed the otel-canceled-span-status branch from 79eeeb0 to a12d4ee Compare July 28, 2025 23:15
@bpholt bpholt force-pushed the otel-canceled-span-status branch from a12d4ee to d75f9db Compare December 20, 2025 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant