feat(bench): wire telemetrygen OTLP capture into bench.yml (PR-N1) - #70
Conversation
Adds a `capture` input to bench.yml. Default `telemetrygen` installs otelcol-contrib + telemetrygen at a pinned version, boots the collector with an OTLP-gRPC receiver + fileexporter (config in bench-collector.yaml next to the workflow), generates N synthetic log records via telemetrygen, snapshots the captured OTLP/JSON file into bench-corpus/. `capture: none` preserves the existing manual-corpus path. Defaults updated: corpus_dir to bench-corpus/telemetrygen- synthetic-v1, hardware_kind from the unknown `github-ubuntu-4vcpu` to the RFC-blessed `ci-runner`. Job summary explicitly tags the run as synthetic-on-content (real OTLP wire envelope, uniform body shape) — A1/C1 numbers from this corpus are diagnostic, not canonical. An OTel Demo capture is the natural follow-up corpus tag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an OTEL Collector config and extends the bench GitHub Actions workflow with a new ChangesTelemetrygen corpus capture integration
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adds an in-CI synthetic corpus capture path to the manual bench workflow so a workflow_dispatch run can generate an OTLP/JSONL corpus (via telemetrygen + an OTel collector fileexporter) and then run ourios-bench end-to-end without requiring a pre-staged corpus.
Changes:
- Extends
bench.ymlwith a newcapturemode (telemetrygen|none) and parameters for synthetic log generation. - Downloads and runs
otelcol-contrib+telemetrygen, captures OTLP/JSONL logs, and snapshots them intobench-corpus/telemetrygen-synthetic-v1/. - Adds a minimal OTel collector config (
bench-collector.yaml) to receive OTLP and write JSONL to disk for the bench loader.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/bench.yml | Adds workflow inputs and a capture phase that generates a synthetic OTLP/JSONL corpus before running ourios-bench. |
| .github/workflows/bench-collector.yaml | Defines the minimal collector pipeline (OTLP receiver → fileexporter to JSONL) used by the capture phase. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/bench-collector.yaml (1)
1-45:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMove
bench-collector.yamlout of.github/workflows/.GitHub treats
.github/workflows/*.yml|*.yamlfiles as workflow candidates and validates workflow syntax (includingonandjobs). This file is only OTel Collector config (receivers/exporters/service) and lacks those keys, so it can trigger “invalid workflow” / missingon/jobserrors. Move it to a non-workflow path and updatebench.yml’s--configreference accordingly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/bench-collector.yaml around lines 1 - 45, The bench-collector.yaml file (contains receivers/exporters/service settings and the file/corpus exporter writing to /tmp/otel-capture/logs.jsonl) must be moved out of .github/workflows/ because GH Actions validates YAML in that directory as workflows; relocate bench-collector.yaml to a non-workflow path (e.g., a configs/ or infra/ directory) and then update the bench.yml invocation that supplies --config to point to the new path so the OTLP receiver (otlp grpc/http endpoints) and fileexporter remain referenced correctly. Ensure bench.yml still references the same config filename and that the exporters/receivers/service keys are unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bench.yml:
- Around line 112-115: The capture step currently writes to a fixed path
(bench-corpus/telemetrygen-synthetic-v1) but downstream "bench" and "summary"
steps still read inputs.corpus_dir; update the capture step (give it an id,
e.g., id: capture_corpus_telemetrygen) to emit an outputs.corpus_dir set to the
actual written path (use the computed path string as the output), then change
downstream references to use
steps.capture_corpus_telemetrygen.outputs.corpus_dir when inputs.capture ==
'telemetrygen' (or fall back to inputs.corpus_dir otherwise); apply the same
pattern to the other capture steps mentioned so bench and summary always consume
the produced corpus path rather than the raw input.
---
Outside diff comments:
In @.github/workflows/bench-collector.yaml:
- Around line 1-45: The bench-collector.yaml file (contains
receivers/exporters/service settings and the file/corpus exporter writing to
/tmp/otel-capture/logs.jsonl) must be moved out of .github/workflows/ because GH
Actions validates YAML in that directory as workflows; relocate
bench-collector.yaml to a non-workflow path (e.g., a configs/ or infra/
directory) and then update the bench.yml invocation that supplies --config to
point to the new path so the OTLP receiver (otlp grpc/http endpoints) and
fileexporter remain referenced correctly. Ensure bench.yml still references the
same config filename and that the exporters/receivers/service keys are
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a66ea8ea-8f8b-45ad-a008-343fbbd592dd
📒 Files selected for processing (2)
.github/workflows/bench-collector.yaml.github/workflows/bench.yml
What
First step toward flipping
docs/benchmarks.md§9 from "no benchmark has been run" to a real measured row. Wires an in-CI corpus capture path intobench.ymlso a manual dispatch produces actual A1/C1/C2 numbers end-to-end, with zero pre-staged corpus state..github/workflows/bench-collector.yaml— minimal OTel collector config: OTLP-gRPC + OTLP-HTTP receiver →fileexporterwriting OTLP/JSON Lines to/tmp/otel-capture/logs.jsonl(the wire shapeourios-bench's*.jsonlloader consumes per RFC 0006 §3.1)..github/workflows/bench.yml:captureworkflow input.telemetrygen(default) drives the in-CI capture;nonepreserves the existing manual-corpus path.otelcol-contrib(binary download from the collector-releases repo) +telemetrygen(go installagainst the contrib repo) at a workflow-level pinnedOTEL_VER = v0.115.0.telemetrygen_logsrecords (default 1M), flushes, kills the collector, snapshots intobench-corpus/telemetrygen-synthetic-v1/.corpus_dirdefault changed tobench-corpus/telemetrygen-synthetic-v1(the captured path).hardware_kinddefault changed from the unknown taggithub-ubuntu-4vcputo the RFC 0006 §3.5 RFC-blessedci-runner.Why telemetrygen, not Loghub or the OTel Demo
Considered three corpus sources:
telemetrygen— real OTLP wire envelopes (real codec, real Resource/Scope structure, real batch boundaries) but uniform synthetic bodies. Runs entirely in-CI, no committed corpus, no release-asset plumbing. Confirmed by the OpenTelemetry knowledge base as the intended-purpose tool for this kind of fixture generation.Picked #3 as the MVP because it gets us the first §9 row with honest tagging today, and #2 lands as a follow-up
captureoption with the same workflow surface.What this run won't claim
ci-runneris the RFC 0006 §3.5 tag; the §1 baseline isbaseline-8vcpu-32gib. Per the §7 escalation rule, a thesis-gate failure onci-runnerdoes not trigger pillar-level escalation — only failures on the §1 baseline + a representative corpus do.telemetrygen-synthetic-v1will compress unrealistically well (uniform body content). The expected reading of an inflated A1 number is "the writer-side compression path works end-to-end", not "the thesis holds for production logs".corpus: telemetrygen-synthetic-v1in the results JSON is the warning label.Out of scope (follow-ups)
docs/benchmarks.mdwith theci-runner+telemetrygen-synthetic-v1annotation.capture: otel-demo— runs the OpenTelemetry Demo in CI, captures real envelopes + real bodies for ~30 min, uploads as acorpus/otel-demo-vNrelease asset, bench fetches it. The representative-content corpus.baseline-8vcpu-32gibso the §7 escalation rule has teeth. This is the row that flips the project's thesis claim from "we believe" to "the thesis survives one run."CLAUDE.md §6.6
cargo fmt --all --check— clean.cargo clippy --all-targets --all-features -- -D warnings— clean.cargo test --all-features— 322 passed / 0 failed / 44 ignored (no Rust changes; baseline preserved).mdbook build— clean.yaml.safe_load.workflow_dispatch-only); first real dispatch happens after merge.Invariants touched
None — this PR is bench-only, no change to the writer / reader / WAL / miner contracts.
🤖 Generated with Claude Code
Summary by CodeRabbit