Repository navigation
feat(core,agent): add opt-in cross-agent trace correlation - #187
Merged
yuluo-yx merged 1 commit intoOct 22, 2026
Merged
Conversation
…ntic-ai-java#131) Introduce an explicit AgentTracer opt-in on top of Micrometer Observation so submission, delegation, receipt and recovery form a searchable chain: - graph-core observation.trace package: AgentTraceOperation/AgentTraceKeys/ AgentTraceContext/AgentTraceSpan/AgentTracer with low- and high-cardinality correlation keys, MDC mirroring, delegation-id span links and sanitizer-based error redaction - ObservedRunStore decorator records submit/acquire/commit spans with the lease fencing token as the attempt id - TaskTool/TaskOutputTool share a TaskTraceCorrelation store so delegation and receive spans correlate through run/task/attempt/delegation ids, including background execution, timeouts and failures - A2A send/receive spans propagate producer context in request metadata and survive the streaming worker thread without thread-locals - documentation in graph-core and observation starter READMEs; no new starter configuration keys, historical behavior unchanged when no tracer is supplied
Contributor
Author
|
CI note: the |
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.
Cross-agent trace correlation (T26)
Confirmed contribution to ARGI. Adds an explicit opt-in
AgentTraceron top of MicrometerObservationso submission, delegation, receipt, model/tool attempts and recovery form a searchable chain instead of surfacing only isolated child-agent errors.What this does
observation.tracepackage (AgentTraceOperation,AgentTraceKeys,AgentTraceContext,AgentTraceSpan,AgentTracer): low-cardinality operation/role/phase/success/outcome/error-type keys, high-cardinality tenant/run/task/attempt/delegation/thread identifiers, MDC mirroring with restore-on-close, delegation-id span-link modeling (Micrometer 1.x has no span-link API), and sanitizer-based error redaction - only the redacted wrapper reachesobservation.error(...).ObservedRunStoredecorator: explicitsubmit/acquire/commitspans with the lease fencing token as the attempt id; read-through calls stay span-free.TaskTraceCorrelationstore; delegation spans carry run/tenant/attempt/delegation ids, background tasks anchor the delegation id, receive spans link back to it; timeouts and failures record outcomes with sanitized content; child configs follow theAgentToolderivation convention; the upstream tenant isolation inTaskRepository.getTask(taskId, callerTenantId)is preserved.argiRunId/argiTenant/argiAttemptId/argiThreadId/argiDelegationIdrequest metadata; fan-in/long-wait connections use theargi.agent.link.delegation.idlink key.Opt-in and compatibility
AgentTracerand passing it toTaskToolsBuilder,A2aRemoteAgent.Builderor wrapping aRunStore- installing the observation starter alone does not enable it, and the starter gains no new configuration keys (the strict 2.1.0 metadata compatibility test stays intact).NOOPregistry every code path behaves exactly as before and emits nothing.Verification
ObservedRunStore) + 9 framework (TaskTool sync/background/timeout/failure, TaskOutputTool receive link, A2A blocking/streaming/disabled).package,format-check,checkstyle-check,licenses-check, yamllint/codespell/newline-check,verify-api-contract.sh- all green (full-suite numbers in the evidence record for this change).Fixes #131