Conversation
…giene) Every span in the Poller.Do call chain (Poller.Do, Poller.Do.func, Poller.pollTenantAndCreateIndex, Poller.pollTenantBlocks, pollBlock) could return a non-nil error but never called SetStatus/RecordError, so the span stayed Unset regardless of outcome - indistinguishable from "nobody checked." pollUnknown was the one exception, but even it never set Ok explicitly on its success path. Add pkg/util/tracing.RecordErr and use it from a defer right after each span is created, closing over each function's named (mostly blank-named, `_`) return values so the existing return statements don't need to change. Considered but did not collapse pollUnknown's per-block span-in-a-loop (Poller.pollBlock): every storage backend's Read/ListBlocks/etc. starts its own nested span from that per-block ctx, so collapsing it would reparent those spans onto pollUnknown instead, which is a real trace-structure change, not "just tracing." Also switches the blocklist package's span tests off the swap-the- global-TracerProvider-per-test pattern: OTel's global tracer only delegates reliably to the *first* concrete provider installed via otel.SetTracerProvider in a process, so a second span test doing the same swap silently stopped capturing spans. Tests now share one provider (installed once) and Reset() its exporter per test instead.
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.
Follow-up to #7951.
Checklist
.chloggen/