OTEL Collector¶
otel
¶
OTLP HTTP/JSON receiver and token/cost summary.
Lightweight collector that accepts OTLP exports for metrics and logs, tracks token usage over a sliding window, and prints a summary.
start_collector(run_dir, bind_addr='127.0.0.1')
¶
Start the OTEL collector as a subprocess. Returns (proc, port).
Source code in src/agentic_ci/otel.py
stop_collector(proc)
¶
parse_metrics(records)
¶
Parse OTLP JSONL records into structured token/cost data.
Source code in src/agentic_ci/otel.py
print_summary(log_file)
¶
Print a human-readable token/cost summary from an OTEL JSONL log.
Source code in src/agentic_ci/otel.py
main()
¶
Run the OTEL collector server.