Repository navigation
fix(ingest): a span without a status no longer takes the export down - #235
Merged
Merged
Conversation
exportTraces read sp.Status.Code and sp.Status.Message directly. status is optional in OTLP and most SDKs omit it entirely when the status is unset, so an ordinary span panicked the handler: the connection was dropped mid-request and every span, log and metric in that export was lost with it. A collector sees an EOF and retries, and the retry panics the same way. Found by pointing an OTLP exporter at a local build while checking other work, which is also why the regression test posts the payload a real exporter sends rather than the one the existing tests construct. Both fields read through the generated getters now, and an unset status is recorded as STATUS_CODE_UNSET. Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
exportTracesreadsp.Status.Codeandsp.Status.Messagedirectly.statusis optional in OTLP and most SDKs omit it entirely when the status is unset, so an ordinary span panicked the handler: the connection was dropped mid-request and every span, log and metric in that export was lost with it. A collector sees an EOF and retries, and the retry panics the same way.Both fields read through the generated getters now, and an unset status is recorded as
STATUS_CODE_UNSET.How it was found
Pointing an OTLP exporter at a local build while verifying other work. The existing tests construct spans with a status set, which is why this survived them — the regression test posts the payload a real exporter sends instead.
Verification
just checkjust test-racewhen auth, API, ingest, query, MCP, or agent paths changedConfirmed against a local instance: the same seed payload that killed the handler now ingests and rolls up.
Independent of #233 and #234 — branched from main, and worth landing first.