Repository navigation
caude hook trace propagation - #330
Open
davidabram wants to merge 7 commits into
Open
davidabram wants to merge 7 commits into
davidabram wants to merge 7 commits into
Conversation
Capture the staged implementation plan for connecting Claude Code hook execution to managed OTLP tracing, including propagation probing, hook span admission, child spans, privacy and parity constraints, and live verification. Plan: claude-hook-trace-propagation Tasks: T01, T02, T03, T04, T05 Co-authored-by: SCE <sce@crocoder.dev>
Capture Claude Code 2.1.301 probe results for PreToolUse and PostToolUse hooks, including the interaction-span parent context, tool_use_id correlation, caller environment markers, and telemetry gating behavior. Update the context map and complete T01 with the qualified parent_context_available verdict, while documenting that future SCE hook spans must be siblings of Claude tool spans under claude_code.interaction. Plan: claude-hook-trace-propagation (T01) Co-authored-by: SCE <sce@crocoder.dev>
Enable managed OTLP telemetry for Claude-invoked hook processes while keeping non-Claude hooks and the telemetry-header helper on Noop. Classify admitted invocations before credential lookup, emit one privacy-filtered `sce.hook` span with Claude correlation IDs, and preserve fail-open hook behavior under credential or exporter failures. Add admission, payload-redaction, and parity coverage while updating the observability contract and decision record. Plan: claude-hook-trace-propagation (T02) Co-authored-by: SCE <sce@crocoder.dev>
Join Claude hook telemetry to Claude Code's W3C trace when a valid parent is available, while preserving independent roots for missing or invalid context. Extract TRACEPARENT/TRACESTATE only for Claude hooks, attach the parent to the root span, and verify child-span inheritance across async polls and worker migration. Plan: claude-hook-trace-propagation (T03) Co-authored-by: SCE <sce@crocoder.dev>
Expose the mutation-scope, Git snapshot, and persistence phases of admitted Claude hooks as low-cardinality OTLP child spans so hook traces show which operations actually ran without changing command behavior. Add reusable span instrumentation at the Claude adapter, mutation-trace coordinator, and scope runtime boundaries, and filter child spans out of ordinary command exports. Ref: context/plans/claude-hook-trace-propagation.md (T04) Co-authored-by: SCE <sce@crocoder.dev>
Complete T05 for the claude-hook-trace-propagation plan by recording Dash0 evidence for `sce doctor` and a Claude Code session, documenting the verified and unverified span hierarchy, and adding an opt-in live smoke procedure. Sync the current admission, session-boundary behavior, credential, and context-map documentation. The live evidence confirms standalone and session-boundary exports while leaving parented tool-hook delivery unverified; local validation and smoke results are recorded without claiming collector delivery. Plan: claude-hook-trace-propagation, task T05 Co-authored-by: SCE <sce@crocoder.dev>
davidabram
force-pushed
the
claude-hook-trace-propagation
branch
from
October 17, 2026 17:34
b3d9d9f to
1f10987
Compare
This branch has not been deployed
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.
No description provided.