feat(otel): stamp tangle.run.id + tangle.subject.key on the loop root span#354
Merged
Conversation
… span Lets a consuming run system-of-record (Tangle Intelligence's run spine) map a span tree to one run + its subject deterministically, instead of inferring the run from the conversation id and the subject from the service name. Additive — both are derived from data already in the loop-started payload (runId, agentRunNames[0]); existing attributes and the 17 otel-export tests are unchanged.
tangletools
approved these changes
Jun 22, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved PR — 750b69c5
Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-22T00:13:28Z
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
Two additive attributes on the loop root span in
otel-export.ts:tangle.run.id— explicit run identity (=runId), so a consuming system of record maps a span tree to exactly one run deterministically, rather than inferring it fromgen_ai.conversation.id.tangle.subject.key— the subject grain (=agentRunNames[0], the lead agent/profile the run drove), so runs group under the thing being worked on instead of one service-wide bucket.Why
Tangle Intelligence's new agent-work spine reconstructs
subjects+runsfrom ingested OTel spans. Today it can group agent-runtime runs by conversation id and derive a subject fromservice.name— but that buckets every run under one subject. Stamping the run id + subject explicitly lets the spine map run → subject from the executor itself, deterministically.Safety
loop.startedpayload (runId,agentRunNames). No new plumbing, no behavior change.otel-exporttests pass, with two added assertions for the new keys.Pairs with the Intelligence spine PR (tangle-network/agent-dev-container#2504). This is the optional "deterministic mapping" half — the spine already works without it by inference; this makes the mapping exact.