Introduce OpenTelemetry-style tracing spans: Begin/End span pair - #6654
Draft
Icelandjack wants to merge 1 commit into
Draft
Introduce OpenTelemetry-style tracing spans: Begin/End span pair#6654Icelandjack wants to merge 1 commit into
Icelandjack wants to merge 1 commit into
Conversation
Icelandjack
marked this pull request as draft
August 19, 2026 13:02
Icelandjack
force-pushed
the
baldurb/span
branch
from
August 19, 2026 13:04
e62753f to
be8dd42
Compare
Icelandjack
force-pushed
the
baldurb/span
branch
2 times, most recently
from
August 19, 2026 13:23
996fd33 to
c0c7565
Compare
…h the possiblity of nesting.
Icelandjack
force-pushed
the
baldurb/span
branch
from
August 19, 2026 15:41
c0c7565 to
bde16d6
Compare
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.
Description
Introduce
Cardano.Node.Tracing.Span, an OpenTelemetry-shaped tracingprimitive layered on top of the
trace-dispatcherframework. It gives aLoki/Tempo (or any OTel-compatible) backend correlated Begin/End trace
events with a shared
trace_id, parent-childparent_span_idlinks,and a client-side measured duration, without requiring the consumer to
pair events itself.
What lands
SpanTrace:SpanBegin traceId spanId parentSpanId nameSpanEnd traceId spanId name durationMswithSpan tr ctx name action— brackets an action withfinally:emits
SpanBeginon entry,SpanEndon exit (including exception),updates the context to point at the new span, and restores the
previous state on the way out. Nesting composes without explicit
parent threading:
Tests
Test.Cardano.Node.Tracing.Spanadds seventeen Hedgehog propertiesinto the existing
cardano-node-testsuite (no new binary):Checklist
See Running tests for more details
CHANGELOG.mdfor affected packagecardano-node-chairman,cardano-submit-apiandcardano-testnetinstead need achangelog fragment in
<package>/.changes/, because theirCHANGELOG.mdis generatedfrom fragments at release time. Copy
_TEMPLATE.ymlfrom that directory, or runnix run github:input-output-hk/cardano-dev#herald -- new.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.