Skip to content

chore(dev): just recipes to dogfood OTLP telemetry into a local server - #605

Merged
jensholdgaard merged 4 commits into
mainfrom
just-dogfood-otlp
Jul 23, 2026
Merged

chore(dev): just recipes to dogfood OTLP telemetry into a local server#605
jensholdgaard merged 4 commits into
mainfrom
just-dogfood-otlp

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 23, 2026

Copy link
Copy Markdown
Owner

just recipes to dogfood OTLP telemetry into a local Ourios

Dev-ergonomics only (no product code) — makes it a one-liner to capture real agent telemetry locally, per the discussion about using Claude Code / Copilot CLI OTLP output as a real (non-synthetic) corpus. The key insight: Ourios is an OTLP log receiver, so there's nothing to install — no Collector, no container runtime.

Three recipes:

  • just dogfood-server — runs ourios-server with the receiver + querier roles and a local filesystem store/WAL under scratch/dogfood/ (gitignored). Open receiver (no auth section → open, RFC 0026); ports 4318 (OTLP/HTTP), 4317 (gRPC), 4319 (query).
  • just dogfood-env — prints the source-side env block to point a tool's telemetry at it (Claude Code, Copilot CLI, or any OTel Collector). Logs-only per §1 (metrics/traces disabled); content capture is called out as opt-in and privacy-sensitive (that's where the wordy structured bodies live — scrub before freezing any of it as a corpus).
  • just dogfood-clean — wipes the captured store.

Why it's safe / in scope

  • Touches only Justfile — no product code, no new dependencies.
  • Everything lands under scratch/ (gitignored); nothing persistent is committed.
  • The recipe comments match the file's existing style; just --list renders them like the other multi-line recipes.

Verified end-to-end (not just plausible)

Booted the server on the recipe's exact env, POSTed a claude_code.user_prompt-shaped OTLP log to :4318/v1/logsHTTP 200 (partialSuccess: null), durably ingested (WAL segment written), clean shutdown.

Usage: just dogfood-server in one terminal, just dogfood-env in another (export the output, then start a new claude session so telemetry is picked up at startup).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a local dogfood workflow for running the server as an OTLP log receiver.
    • Added commands to print source configuration settings and local endpoint details.
    • Added a cleanup command to remove locally captured logs and temporary data.

Adds `just dogfood-server`, `just dogfood-env`, and `just dogfood-clean` so a
developer can capture real agent telemetry locally without installing anything
— Ourios *is* an OTLP log receiver, so no Collector or container is needed.

`dogfood-server` runs ourios-server with the receiver + querier roles and a
local filesystem store/WAL under scratch/dogfood/ (gitignored); the receiver is
open (no auth section → open, RFC 0026) and listens on 4318 (OTLP/HTTP), 4317
(gRPC), 4319 (query). `dogfood-env` prints the source-side env block to point a
tool's telemetry (Claude Code, Copilot CLI, an OTel Collector) at it —
logs-only per §1, with content capture called out as opt-in/privacy-sensitive.

Verified end-to-end: the server boots on the recipe's env, a claude_code-shaped
OTLP log POSTed to :4318/v1/logs returns HTTP 200 and is durably ingested (WAL
segment written).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
@jensholdgaard
jensholdgaard requested a review from Copilot July 23, 2026 12:26
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c40bcf76-161e-477d-9126-ba5b3b7e358b

📥 Commits

Reviewing files that changed from the base of the PR and between af07bdf and 93cef3c.

📒 Files selected for processing (1)
  • justfile
📝 Walkthrough

Walkthrough

The justfile adds a local OTLP-log dogfood workflow with recipes for starting ourios-server, printing client environment exports, and deleting captured filesystem data and WAL files.

Changes

Local OTLP log dogfood workflow

Layer / File(s) Summary
Dogfood server and lifecycle recipes
justfile
Adds dogfood-server, dogfood-env, and dogfood-clean recipes for local OTLP log ingestion, filesystem storage/WAL configuration, endpoint display, client setup, and scratch-data cleanup.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding just recipes for a local OTLP dogfood server.
Description check ✅ Passed It covers the summary well, but it omits the template's explicit Related section and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch just-dogfood-otlp

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds developer-ergonomics just recipes to make it easy to run a local Ourios instance as an OTLP logs sink and point real tool telemetry (e.g., Claude Code / Copilot CLI / Collector) at it, storing everything under scratch/ for local dogfooding.

Changes:

  • Add just dogfood-server to run ourios-server locally with receiver + querier enabled and local store/WAL under scratch/dogfood/.
  • Add just dogfood-env to print an environment-variable block for exporting OTLP logs to the local receiver (metrics/traces disabled).
  • Add just dogfood-clean to wipe the local dogfood data directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread justfile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 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 `@justfile`:
- Around line 233-235: Update dogfood-server to create and maintain a lock or
PID marker while running, then make dogfood-clean check that marker before
executing rm -rf and refuse cleanup when the server is active. Ensure the marker
is reliably removed when dogfood-server exits so cleanup can proceed afterward.
- Around line 214-225: Update the dogfood-env telemetry block to remove any
hard-coded Claude-specific service identity from the shared OpenTelemetry
environment, using a configurable or source-neutral service name instead. Keep
Claude-specific telemetry flags separate from generic OTel exports, preserving
the existing logs-only settings.
- Around line 204-211: Update the dogfood-server environment setup before cargo
run to explicitly bind receiver and querier endpoints to loopback, including the
receiver ports, querier HTTP port, and OTEL_EXPORTER_OTLP_ENDPOINT. Keep the
printed localhost URLs and existing storage and role settings 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: f4a7b93b-0988-436d-b871-27a597fe9065

📥 Commits

Reviewing files that changed from the base of the PR and between e8d26e8 and af07bdf.

📒 Files selected for processing (1)
  • justfile

Comment thread justfile Outdated
Comment thread justfile Outdated
Comment thread justfile Outdated
…, clean guard

Review fixes (Copilot + CodeRabbit):

- Bind the receiver + querier to 127.0.0.1 (OURIOS_RECEIVER_GRPC_ADDR/HTTP_ADDR,
  OURIOS_QUERIER_HTTP_ADDR), not ourios-server's 0.0.0.0 defaults. The receiver
  is unauthenticated for local dogfooding, so binding to all interfaces would
  expose open OTLP ingest + a query API to the LAN (e.g. on public Wi-Fi);
  loopback keeps it to this machine.
- dogfood-env no longer hard-codes Claude identity: the OTEL_* block is
  source-agnostic and the tool-specific *enable* flag (CLAUDE_CODE_ENABLE_
  TELEMETRY vs COPILOT_OTEL_ENABLED) is a per-tool comment, so the same block
  serves Claude Code, Copilot CLI, or any OTLP source. OTEL_SERVICE_NAME is a
  placeholder (the source's identity -> the Ourios tenant).
- dogfood-clean refuses to rm -rf while dogfood-server is still listening on
  4318, so cleanup can't race the server mid-write and corrupt the capture. A
  port-in-use check rather than a PID/lock file: it directly answers "is the
  server writing?" and can't go stale on an abnormal exit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread justfile
A failed `if` condition is not caught by `set -e`, so a missing lsof
would silently skip the running-server guard and let the wipe race a
live server. Fail hard instead, and match the message to what the check
actually observes (port in use).

Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread justfile Outdated
The query API requires the x-ourios-tenant header (RFC 0016 §3.3),
derived from service.name — a first query without it 400s. Print a
copy-paste curl using the same tenant as OTEL_SERVICE_NAME. Convert the
recipe to a quoted heredoc so the single-quoted curl needs no escaping.

Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants