Prompt
I'm building a distributed system and need service dependency maps from traces
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
Absolutely — service dependency maps are a great use case for tracing.
If you want, I can help you with any of these:
- Design the trace-to-dependency pipeline
- Write code to extract service maps from OpenTelemetry / Jaeger / Zipkin traces
- Define a graph schema for services, calls, error rates, latency, etc.
- Build an algorithm to infer dependencies from span parent/child relationships
- Generate a visualization for a live dependency map
A common approach is:
- Collect distributed traces
- Identify spans with service name / peer service / destination
- Build directed edges:
caller_service -> callee_service - Aggregate metrics per edge:
- request count
- error count
- p50/p95/p99 latency
- average duration
- Normalize by trace ID and span relationships to avoid double counting
- Optionally compute:
- synchronous vs asynchronous dependency
- retries
- fan-out / fan-in
- critical path
Typical graph output:
ServiceA -> ServiceB
ServiceA -> ServiceC
ServiceB -> ServiceD
With metadata like:
{
"source": "ServiceA",
"target": "ServiceB",
"calls": 12893,
"errors": 42,
"avg_latency_ms": 17.4,
"p95_latency_ms": 61.2
}
If you want, I can produce one of these next:
- a Python script
- a Go implementation
- an OpenTelemetry collector pipeline
- a SQL query for trace data in ClickHouse/BigQuery
- a graph model + schema
- a step-by-step architecture for production use