Identify the batch or fan-in pattern where one span logically depends on or aggregates multiple upstream spans from different traces
When creating the downstream span, add span links referencing the span contexts of the upstream spans using the span link API
Attach attributes to each span link to describe the relationship type, such as the batch job ID or message source identifier
Verify the backend renders span links as navigable connections between traces rather than as child spans
Document the linking convention in your team's instrumentation guide so consumers can follow links from aggregate spans back to source traces
Known gotchas
Span links are distinct from parent-child relationships; backends that do not support span link rendering will show the linked span as a standalone trace with no visible connection
Each span link stores a full span context; adding a large number of links (e.g., one per message in a large batch) increases span size significantly
The upstream trace context must be available at the time the downstream span is created; if messages are processed asynchronously without carrying headers, the context is not recoverable
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp