Prompt
Need service dependency graphs from traces
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
Yes — traces are a good source for building service dependency graphs.
What you can derive from traces
From distributed traces you can infer:
- Which services call which other services
- Call frequency / edge weight
- Latency between services
- Error rates per dependency
- Critical paths through a request flow
Basic approach
Each trace usually contains spans with:
trace_idspan_idparent_span_id- service name / operation name
- timestamps, status, attributes
You can build a graph where:
- Nodes = services
- Edges = caller → callee
- Edge metadata = count, p50/p95 latency, error rate, etc.
Example
If a trace shows:
frontendspan- child span from
frontendtoauth - child span from
frontendtocatalog catalogcallsdb
Then the dependency graph includes:
frontend -> authfrontend -> catalogcatalog -> db
Common implementation steps
- Ingest traces
- Normalize service names
- Reconstruct parent-child relationships
- Map spans to service-to-service edges
- Aggregate across traces
- Export graph
- Graphviz/DOT
- JSON
- Neo4j
- Prometheus/Grafana derived metrics
- OpenTelemetry-compatible backend
Important caveats
- Asynchronous messaging may need special handling:
- Kafka / SQS / PubSub edges aren’t always simple parent-child calls
- Client libraries can create extra spans that should be filtered
- Service naming inconsistencies can fragment nodes
- Sampling can bias the graph if traces are not representative
If you want
I can help with any of these:
- Design a trace-to-graph algorithm
- Write code to generate the graph
- Show how to do this with OpenTelemetry
- Help build a graph in Neo4j / NetworkX / Graphviz
If you have sample trace data, send it and I can turn it into a dependency graph format.