Dependency Graph
How Buildpathio builds a live, accurate service dependency map from your codebase.
Data sources
Buildpathio uses three complementary data sources to build the dependency graph. Each source catches a different class of dependency:
1. Static source analysis
Buildpathio parses your service source code to identify direct imports, package references, and service-to-service HTTP calls via hardcoded endpoints or environment variables. Supported languages:
- Node.js / TypeScript —
require(), ES module imports,axios/fetchcalls - Python —
importstatements,requestslibrary calls - Go — module imports,
net/httpclient usage - Java — Maven/Gradle dependencies,
RestTemplate/WebClientcalls
2. OpenAPI contract detection
Buildpathio scans for OpenAPI spec files matching the glob pattern configured in buildpath.yaml (default: **/openapi.yaml and **/openapi.json). It cross-references producer schemas with consumer call patterns to establish API surface dependencies.
3. Service mesh telemetry (optional)
If you're running Istio or Linkerd, Buildpathio can ingest runtime call graph data to augment the static graph with actual traffic patterns. This is especially useful for services that communicate dynamically or through event buses that are hard to detect statically.
Enable via buildpath.yaml:
graph:
include_runtime_traces: true
mesh_provider: istio # or: linkerd
Graph schema
The dependency graph is a directed graph where:
- Nodes represent services (independently deployable units)
- Edges are directed from the depending service to the dependency (
A → Bmeans A depends on B) - Edge weights represent call frequency (calls/hour) when runtime traces are enabled
Graph configuration reference
| Field | Type | Default | Description |
|---|---|---|---|
scan_targets[].path | string | — | Path to scan, relative to repo root |
scan_targets[].type | string | auto-detect | Language: auto-detect, node, python, go, java |
graph.openapi_glob | string | **/openapi.yaml | Glob pattern for OpenAPI spec files |
graph.include_runtime_traces | bool | false | Enable service mesh telemetry ingestion |
graph.mesh_provider | string | — | istio or linkerd |
graph.exclude_services | string[] | [] | Service names to exclude from graph |