Skip to content

Integrate telemetry trace loading into gm run CLI #15

Description

@lambda-alpha-labs

Problem

Telemetry support in src/telemetry.rs is marked experimental and requires manual API usage. There is no CLI command to import OpenTelemetry traces and bind them to the graph. This limits the usefulness of the runtime overlay, since agents cannot easily leverage the "traffic overlay" without manual setup.

Proposal

Add a --traces flag to gm run that loads an OTEL trace JSON file and integrates it into the graph build:

gm run . --no-semantic --no-viz --traces otel-traces.json

This would:

  1. Import traces during graph build
  2. Bind trace spans to graph nodes
  3. Weight edges by runtime frequency and latency
  4. Make query_graph, safest_path, and hot_path_query instantly leverage the overlay

Acceptance

  • gm run --traces <file> builds graph with runtime overlay
  • Trace-bound edges are weighted by call frequency
  • No regression on existing telemetry or graph build tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions