Start OTEL collector in run_skill() default container runner#78
Conversation
The _default_run_container() function used by run_skill() never started the OTEL collector, so PodmanBackend.run() always received otel_port=None and no telemetry was collected. This meant _load_otel_cost() never found the JSONL file and cost data was never populated in verdicts. Start the collector before the container run and stop it in the finally block. The JSONL file is written to work_dir/_run/claude-otel.jsonl, which is exactly where _load_otel_cost() already looks. If the collector fails to start, log a warning and continue without telemetry. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Emilien Macchi <emacchi@redhat.com>
|
Warning Review limit reached
More reviews will be available in 50 minutes and 30 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Looks good but I guess this won't work for the OpenShell backend. Maybe we can add that in a separate PR. |
ok will do as a follow-up |
|
Summary
_default_run_container()before running the agent container, and stop it in thefinallyblockPodmanBackend.run()so Claude Code exports telemetry metricswork_dir/_run/claude-otel.jsonlwhere_load_otel_cost()already looks, so cost data now flows into verdict_cost_summaryfields automaticallyContext
The OTEL plumbing was fully wired in the
agentic-ci runCLI path but not in therun_skill()path used by autofix and triage runners. All the infrastructure existed (collector, env vars, metric parsing, cost formatting) but the collector was never started, sootel_port=Nonewas passed to the backend and no metrics were collected.Test plan
tox -e lintpassestox -e py313passes (501 tests)claude-otel.jsonlis produced inwork_dir/_run/🤖 Generated with Claude Code