Skip to content

feat(deploy): local dev o11y stack (#121) - #137

Merged
EricAndrechek merged 18 commits into
mainfrom
signoz-local-stack
May 24, 2026
Merged

feat(deploy): local dev o11y stack (#121)#137
EricAndrechek merged 18 commits into
mainfrom
signoz-local-stack

Conversation

@jfwoods

@jfwoods jfwoods commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #121. Rebuilds deployments/signoz/ from upstream SigNoz v0.122.0 (single-node, version-pinned, no :latest), adds dashboards as code with an upsert loader, and wires a make dev-obs workflow.

The hand-rolled deployments/signoz/docker-compose.yaml had bit-rotted: pinned :latest everywhere, used the wrong CLI shape for signoz-otel-collector's migrator (code: 62 Syntax error on an empty --clickhouse-cluster=""), and the consolidated signoz/signoz image had superseded the old query-service + frontend split.

  • deployments/signoz/compose.yaml — upstream-mirrored single-node stack:
    • signoz/signoz:v0.122.0 (consolidated UI/API on host :3301)
    • signoz/signoz-otel-collector:v0.144.3 (OTLP gRPC :4317, HTTP :4318, health :13133 via bash /dev/tcp)
    • signoz-telemetrystore-migrator one-shot (gates the UI + collector on service_completed_successfully)
    • clickhouse-server:25.5.6 with vendored cluster.xml / users.xml / custom-function.xml
    • zookeeper:3.7.1
    • init-clickhouse one-shot fetches the histogramQuantile UDF binary (real upstream SHA256s for all four platform/arch combos SigNoz publishes; set -euo pipefail so wget failures abort)
    • SIGNOZ_TOKENIZER_JWT_SECRET is per-checkout: compose uses ${SIGNOZ_TOKENIZER_JWT_SECRET:?} to fail fast with a remediation pointer on raw docker compose; the Makefile generates a random secret on first need via openssl rand -hex 32 and caches it in deployments/signoz/.signoz-secret.local (gitignored, mode 0600).
  • deployments/signoz/dashboards/ — two version-controlled dashboards (wavehouse-overview.json, wavehouse-runtime-internals.json); widgets scoped to service.name=wavehouse so they don't aggregate other services that may also report to the same SigNoz. load-dashboards.sh upserts by title — auth is token-only because SigNoz v0.122.0 moved password login to /api/v2/sessions/email_password and requires an org UUID that isn't externally discoverable; the JWT the SPA keeps in localStorage under AUTH_TOKEN is one DevTools click away.
  • Makefile##@ Observability targets: signoz-up/down/logs/wipe/dashboards, plus dev-obs (make dev + signoz-up + WaveHouse pointed at the collector + dashboards auto-load when SIGNOZ_TOKEN is in env).
  • deployments/compose/standalone.signoz.yaml — override that wires the containerized standalone.yaml WaveHouse into the local SigNoz stack via host.docker.internal:4317, caps WH_MQ_MAX_BYTES_GB=2 for small dev disks (OrbStack VM defaults to ~28 GB — the WaveHouse default of 50 GB fails JetStream init), and gates WaveHouse on a ClickHouse healthcheck.

Split out of #135. The companion direct-to-cloud OTLP work is in #136.

Test plan

  • make signoz-up brings the stack healthy (UI on :3301, OTLP gRPC on :4317)
  • First-user creation via the UI at http://localhost:3301, then export SIGNOZ_TOKEN=... (from localStorage['AUTH_TOKEN']) and make signoz-dashboards upserts both dashboards (first run creates, re-run updates by ID)
  • Bring WaveHouse up against it: docker compose -p wavehouse -f deployments/compose/standalone.yaml -f deployments/compose/standalone.signoz.yaml up -d --build
  • 5 min of mixed traffic populates panels on both dashboards (~93 RPS across 8+ routes, 200/400/404 mix, valid+large+malformed ingest)
  • make signoz-down followed by make signoz-up resumes cleanly (admin account preserved; SQLite volume not wiped)
  • make signoz-wipe rotates the JWT secret and starts from scratch
  • Reviewer: open http://localhost:3301/dashboard and spot-check WaveHouse panels render against your own run

🤖 Generated with Claude Code

jfwoods and others added 2 commits May 14, 2026 11:27
Closes #121. Replaces the bit-rotted `deployments/signoz/docker-compose.yaml`
(pinned `:latest` everywhere; broke against the current `signoz-otel-collector`
migrate CLI when the upstream schema changed) with a version-pinned, single-node
mirror of upstream SigNoz `v0.122.0`'s `deploy/docker/docker-compose.yaml`,
plus dashboards-as-code and a `make dev-obs` workflow.

Compose stack (`deployments/signoz/compose.yaml`):
- `signoz/signoz:v0.122.0` (consolidated UI/API on host `:3301` → container `:8080`)
- `signoz/signoz-otel-collector:v0.144.3` (OTLP gRPC `:4317`, HTTP `:4318`,
  health on `:13133`)
- `signoz-telemetrystore-migrator` one-shot (bootstrap + sync up + async up;
  exits 0 — `signoz` and `otel-collector` gate on `service_completed_successfully`)
- `clickhouse-server:25.5.6` with the SigNoz ClickHouse cluster XML (1-shard /
  1-replica `cluster` definition + `zookeeper-1` coordination)
- `zookeeper:3.7.1`
- `init-clickhouse` one-shot — fetches the `histogramQuantile` UDF binary into
  the shared `user_scripts` volume so SigNoz histogram panels can render
  p50/p95/p99
- No `container_name:` directives anywhere — uses Docker Compose's default
  `<project>-<service>-<replica>` naming so multiple instances don't collide

Dashboards as code (`deployments/signoz/dashboards/`):
- `wavehouse-overview.json` — HTTP request rate, status code mix, latency
  p50/95/99, by-route latency, span call rate, collector intake
- `wavehouse-runtime-internals.json` — Go runtime (goroutines, memory by type,
  allocations), embedded NATS, ingest counters, HTTP body size p99
- `load-dashboards.sh` — upserts by title against the running stack (PUT
  existing / POST new); auth via `SIGNOZ_EMAIL`+`SIGNOZ_PASSWORD` or
  `SIGNOZ_TOKEN`; `SIGNOZ_URL` defaults to `http://localhost:3301`

Make targets (`##@ Observability`):
- `signoz-up` — idempotent, `--wait` on UI + collector
- `signoz-down` — preserves the admin account (SQLite volume)
- `signoz-logs` — follows the running stack
- `signoz-wipe` — full reset, volumes + admin account
- `signoz-dashboards` — wraps `load-dashboards.sh`
- `dev-obs` — composite: `deps-up` + `signoz-up` + `air` with
  `WH_OTEL_ENABLED=true WH_OTEL_ADDR=127.0.0.1:4317`; auto-loads dashboards
  when `SIGNOZ_TOKEN` is exported
- `clean-all` now tears down the SigNoz project too

Standalone WaveHouse wiring (`deployments/compose/standalone.signoz.yaml`):
A compose override for `standalone.yaml` that points WaveHouse at
`host.docker.internal:4317` (the published collector port), caps
`WH_MQ_MAX_BYTES_GB=2` for small dev disks (OrbStack VM defaults to ~28 GB,
the WaveHouse default of 50 GB fails JetStream init), and gates WaveHouse
on a ClickHouse healthcheck.

Docs:
- `docs/src/content/docs/deployment.md` — SigNoz section rewritten around
  the upstream-modelled stack, the Make wrappers, and the dashboards loader
- `docs/src/content/docs/development.md` — new "Running with observability"
  section with the target table + first-run admin-account guidance
- `README.md` — quick-start bullet pointing at `make dev-obs`
- `WHissues.md` — running-issues log capturing the gotchas hit during the
  rebuild (SigNoz compose rot vs `:latest`, `standalone.yaml`'s 50 GB
  JetStream default, missing ClickHouse readiness gate, the `clickhouse`
  service-name collision when dual-homing networks)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Consolidates the SigNoz dev-stack review-cycle changes that landed on
top of the original feature commit.

- deployments/signoz/load-dashboards.sh: drop the SIGNOZ_EMAIL+SIGNOZ_PASSWORD
  branch entirely. SigNoz v0.122.0 moved password login to
  /api/v2/sessions/email_password and requires an org UUID that isn't
  externally discoverable, so the legacy branch dead-ends silently. The
  JWT the SPA keeps in localStorage under AUTH_TOKEN is one DevTools
  click away — that's SIGNOZ_TOKEN now, and it's the only auth knob.
- Makefile + deployments/signoz/compose.yaml + .gitignore: per-checkout
  SIGNOZ_TOKENIZER_JWT_SECRET. Compose uses `${SIGNOZ_TOKENIZER_JWT_SECRET:?}`
  so raw `docker compose` fails fast with a remediation pointer; the
  Makefile generates a random secret on first need via
  `openssl rand -hex 32` and caches it in
  deployments/signoz/.signoz-secret.local (gitignored, mode 0600);
  signoz-wipe rotates it.
- deployments/signoz/compose.yaml: real histogram-quantile SHA256s for
  all four platform/arch combos SigNoz publishes, verified against
  upstream's signed checksums file. `set -euo pipefail` so wget failures
  and unknown platforms abort cleanly.
- deployments/signoz/dashboards/wavehouse-overview.json: scope widgets
  to `service.name=wavehouse` so the overview doesn't aggregate other
  services that may also be reporting to a local SigNoz.
- Makefile: silence `cat: No such file or directory` when `make clean-all`
  hits the SigNoz prefix on a fresh checkout (2>/dev/null on the
  SIGNOZ_COMPOSE macro's cat).
- docs/src/content/docs/development.md, deployment.md: token-only auth
  in the dashboards-loader instructions; `signoz-dashboards` table-row
  prose updates for consistency with the prose above.
- CHANGELOG.md: new `Unreleased / Added` bullet for the SigNoz local
  dev stack (closes #121).
- WHissues.md: untracked. The running-issues file overlaps with what
  CHANGELOG covers, and its remaining entries point at follow-up work
  outside this PR's scope (`standalone.yaml`'s 50 GB JetStream default,
  missing CH healthcheck). Dangling references in CHANGELOG and
  development.md are left to fall out on the next pass that edits
  those files (minimum-disruption deletion).
@github-actions github-actions Bot added documentation Improvements or additions to documentation area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release labels May 14, 2026
@github-actions
github-actions Bot requested a review from taitelee May 14, 2026 15:33
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the local observability stack by replacing an outdated, bit-rotted SigNoz configuration with a robust, version-pinned deployment. It streamlines the developer experience by introducing integrated Makefile workflows and version-controlled dashboards, ensuring that observability is easily accessible and consistent for all contributors.

Highlights

  • SigNoz Dev Stack: Replaced the legacy hand-rolled SigNoz configuration with a modern, version-pinned single-node stack based on SigNoz v0.122.0.
  • Observability Workflow: Introduced new Makefile targets including dev-obs for integrated development and signoz-dashboards for automated dashboard management.
  • Dashboards as Code: Added version-controlled dashboard JSON files and a dedicated loader script to ensure consistent observability across environments.
  • Integration: Created a standalone.signoz.yaml override to seamlessly route WaveHouse telemetry to the local SigNoz collector.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR replaces the pinned local SigNoz observability stack with lightweight, ephemeral single-container alternatives (Aspire, Grafana LGTM, OTel-Front) invoked via make obs-* targets, simplifying the local development observability experience with pre-built dashboards and automatic browser opening.

Changes

Lightweight ephemeral observability stack

Layer / File(s) Summary
Observability container starter scripts
scripts/otel/aspire.sh, scripts/otel/grafana.sh, scripts/otel/otel-front.sh
Three bash scripts manage lightweight containers (Aspire Dashboard, Grafana LGTM, OTel-Front) with Docker cleanup traps, OTLP port publishing, automatic dashboard URL opening, and log streaming.
Makefile observability targets
Makefile
New phony targets obs-aspire, obs-grafana, obs-front delegate to the container scripts; clean-all updated to remove orphaned observability containers.
Deployment and development documentation
docs/src/content/docs/deployment.md, docs/src/content/docs/development.md
deployment.md adds "Local Observability Stack" section describing ephemeral containers and WH_OTEL_ADDR routing; development.md adds openssl/jq prerequisites, "Running with observability" workflow section, and Makefile targets table with observability group.
README and changelog
README.md, CHANGELOG.md
README notes observability options via make obs-* alongside make dev; changelog records lightweight observability stack integration.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat(deploy): local dev o11y stack (#121)' clearly summarizes the main change: adding local observability stack development infrastructure.
Description check ✅ Passed The PR description is comprehensive and directly related to the changeset, explaining the SigNoz stack rebuild, dashboard implementation, Makefile integration, and testing approach.
Linked Issues check ✅ Passed The PR successfully addresses the core requirements from #121: pinned versions, healthchecks, no container_name directives, OTLP port exposure, Make targets (signoz-up/down/logs/wipe), dev-obs integration, and documentation updates.
Out of Scope Changes check ✅ Passed All changes directly support the PR objectives: observability stack hardening, dev workflow integration, documentation, and supporting scripts. No out-of-scope modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch signoz-local-stack
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch signoz-local-stack

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

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a local SigNoz observability stack with Makefile integration and version-controlled dashboards, enabling traces, metrics, and logs for local development. Key additions include a self-contained SigNoz Docker Compose setup, new Make targets like dev-obs and signoz-up, and comprehensive documentation updates. Feedback focuses on correcting a healthcheck in the otel-collector service that uses an unavailable shell and pseudo-device, and improving security by moving hardcoded credentials (Sentry DSN and ClickHouse password) in configuration files to environment variables.

Comment thread deployments/signoz/compose.yaml Outdated
Comment thread deployments/signoz/clickhouse/config.xml Outdated
Comment thread deployments/signoz/clickhouse/users.xml Outdated
Comment thread Makefile Outdated
Comment thread deployments/signoz/clickhouse/users.xml Outdated
@claude

claude Bot commented May 14, 2026

Copy link
Copy Markdown

0 [MUST], 1 [SHOULD], 1 [MAY] — see inline threads for detail.

The overall implementation is solid: version-pinned images throughout, SHA256-verified UDF binary download with set -euo pipefail, per-checkout JWT secret with no shared default, a correct service_completed_successfully dependency chain for the migrator, an inventive /dev/tcp healthcheck for the collector image that ships without wget/curl, explicit named volumes that dodge project-prefix collisions, and clean doc-sync across deployment.md, development.md, CHANGELOG.md, and README.md.

Ship it — address the [SHOULD] at Makefile:653 (or push back with reasoning) before merge. The clean-all silent-failure is the one thing likely to bite a developer doing a full reset.

@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: 4

🤖 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 `@deployments/signoz/compose.yaml`:
- Around line 64-87: The wget call that fetches the histogram-quantile binary in
the compose.yaml init command can hang; update the wget invocation (the line
starting with wget -q -O histogram-quantile.tar.gz
"https://github.com/SigNoz/...") to include sensible network timeouts and retry
limits (e.g. add flags like --timeout=30 --tries=3 --connect-timeout=10) so the
init container will fail fast on network issues instead of blocking
indefinitely.

In `@deployments/signoz/dashboards/wavehouse-runtime-internals.json`:
- Around line 91-93: Each widget's query filter is empty ("filter":
{"expression": ""}); update each widget's filter.expression to "service.name =
'wavehouse'" so every widget only includes metrics from the local WaveHouse
service—apply this change to all nine widget objects that contain the "filter"
object (the entries currently showing "filter": {"expression": ""}) in the JSON.

In `@docs/src/content/docs/development.md`:
- Around line 187-188: The docs currently reference "WHissues.md §4" which may
not be resolvable from the public site; update the paragraph that mentions the
SigNoz `clickhouse` service and WaveHouse's `clickhouse`
(`deployments/compose/dependencies.yaml`) by either inlining the critical
warning from WHissues.md §4 (about not dual-homing a WaveHouse container onto
both networks because the unqualified hostname becomes ambiguous) or replacing
the reference with a stable docs URL that points to a public page containing
that same warning; ensure the text still mentions the dev-mode flow using
127.0.0.1:4317 to avoid the problem and removes the unresolved WHissues.md link.

In `@Makefile`:
- Line 242: The clean-all flow uses SIGNOZ_COMPOSE but doesn't ensure
SIGNOZ_SECRET_FILE exists, so add an explicit existence check for
$(SIGNOZ_SECRET_FILE) at the start of the clean-all target (or just before the
invocation that uses SIGNOZ_COMPOSE); if the file is missing, fail fast with an
error message instead of letting docker compose hit a missing-variable error or
silencing it. Concretely, in the clean-all target add a conditional like "test
-f $(SIGNOZ_SECRET_FILE) || { echo 'Missing SIGNOZ secret:
$(SIGNOZ_SECRET_FILE)'; exit 1; }" before calling SIGNOZ_COMPOSE, and remove the
"|| true" that currently masks failures so teardown errors are not silently
ignored.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7bc08944-315e-4c16-b2f9-7cb7948bea5e

📥 Commits

Reviewing files that changed from the base of the PR and between 7855982 and 6240609.

📒 Files selected for processing (21)
  • .gitignore
  • CHANGELOG.md
  • Makefile
  • README.md
  • deployments/compose/standalone.signoz.yaml
  • deployments/signoz/.env.example
  • deployments/signoz/clickhouse/cluster.xml
  • deployments/signoz/clickhouse/config.xml
  • deployments/signoz/clickhouse/custom-function.xml
  • deployments/signoz/clickhouse/user_scripts/.gitkeep
  • deployments/signoz/clickhouse/users.xml
  • deployments/signoz/compose.yaml
  • deployments/signoz/dashboards/README.md
  • deployments/signoz/dashboards/wavehouse-overview.json
  • deployments/signoz/dashboards/wavehouse-runtime-internals.json
  • deployments/signoz/docker-compose.yaml
  • deployments/signoz/load-dashboards.sh
  • deployments/signoz/otel-collector-config.yaml
  • deployments/signoz/otel-collector-opamp-config.yaml
  • docs/src/content/docs/deployment.md
  • docs/src/content/docs/development.md
💤 Files with no reviewable changes (2)
  • deployments/signoz/docker-compose.yaml
  • deployments/signoz/.env.example

Comment thread deployments/signoz/compose.yaml Outdated
Comment thread deployments/signoz/dashboards/wavehouse-runtime-internals.json Outdated
Comment thread docs/src/content/docs/development.md Outdated
Comment thread Makefile Outdated
@github-project-automation github-project-automation Bot moved this from Backlog to Ready in WaveHouse Task Board May 14, 2026
…timeout, docs link

- `Makefile`: SIGNOZ_COMPOSE now falls back to a teardown-placeholder when
  `.signoz-secret.local` is missing, so `clean-all` actually wipes SigNoz
  volumes instead of silently no-opping on compose's `:?` guard.
- `wavehouse-runtime-internals.json`: scope all 9 widget queries to
  `service.name = 'wavehouse'` (matches the PR body's stated intent; was
  missed when the dashboard was last re-exported).
- `compose.yaml`: add `--timeout=30 --tries=3` to the init-clickhouse
  `wget` so a hung github.com fetch fails fast instead of blocking
  `--wait` indefinitely.
- `development.md`: drop the `WHissues.md §4` reference from the
  published docs paragraph — surrounding sentence already carries the
  operational point and the link doesn't resolve from wavehouse.dev.
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 14, 2026
Comment thread deployments/signoz/load-dashboards.sh Outdated
@claude

claude Bot commented May 14, 2026

Copy link
Copy Markdown

0 [MUST], 0 [SHOULD], 1 [MAY] — see inline thread for detail.

What prior reviews covered (not re-flagging):

  • --max-time 30 on all curl calls — addressed in f9cbd01
  • load-dashboards.sh duplicate-title guard — addressed in f9cbd01 ✓; the comment at lines 57–61 correctly documents why the pre-fetched existing snapshot is safe given that guard
  • otel-collector /dev/tcp healthcheck — validated; image ships with bash, port 13133 not published to host ✓
  • SHA256-pinned UDF binary fetch with set -euo pipefail — correct ✓
  • Per-checkout JWT secret (SIGNOZ_TOKENIZER_JWT_SECRET:?) — no shared default in the repo ✓
  • No published ports for internal services (SigNoz ClickHouse, pprof, health_check) ✓

The single [MAY]: signoz-down and signoz-logs depend on $(SIGNOZ_SECRET_FILE), but SIGNOZ_COMPOSE already handles a missing file via the || printf teardown-placeholder fallback — so those two targets create an orphaned secret file after a signoz-wipe. clean-all correctly calls SIGNOZ_COMPOSE without the file dep. Details in the inline thread.

Ship it — no MUST or SHOULD findings; drop the file prereq from signoz-down/signoz-logs when convenient.

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

@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: 1

🤖 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 `@deployments/signoz/load-dashboards.sh`:
- Around line 54-70: The loop currently uses the pre-fetched existing variable
to decide create vs update but does not detect duplicate .title values among the
local files array, causing multiple creates for the same title; add a pre-check
before the for f in "${files[@]}" loop that scans each file's .title (the title
variable logic using jq -r '.title') and fails fast if any title appears more
than once in files (e.g. build a bash associative array or use a temporary map
to count titles and echo an error/exit 1 on duplicates), keeping the existing id
lookup and update/create behavior 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f05bf939-8897-41ff-b521-404b59e9a549

📥 Commits

Reviewing files that changed from the base of the PR and between 8f5e248 and 859b7e3.

📒 Files selected for processing (1)
  • deployments/signoz/load-dashboards.sh

Comment thread deployments/signoz/load-dashboards.sh Outdated
…e-title guard

- `load-dashboards.sh`: all three `curl` calls now use `--max-time 30`, so a
  stalled SigNoz API can't hang the script indefinitely (and the
  `make dev-obs` `|| echo "failed; continuing"` guard, which only catches
  non-zero exit, can actually reach the continuation).
- `load-dashboards.sh`: reject duplicate `.title` across local JSON files
  before the upsert loop — `existing` is snapshot once, so two files
  sharing a title would both miss the lookup and silently POST, producing
  duplicate dashboards instead of an upsert.
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 14, 2026
Comment thread Makefile Outdated
@jfwoods

jfwoods commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 15, 2026
@claude

claude Bot commented May 15, 2026

Copy link
Copy Markdown

0 [MUST], 0 [SHOULD], 0 [MAY] — no new inline threads this round.

What this round verified against the merge-base diff and the full commit history (14 commits):

  • SHA256 verification on the histogram-quantile binary — correct: sha256sum -c runs before tar, set -euo pipefail propagates failures, --timeout=30 --tries=3 on wget, and the case statement enumerates all four platform/arch combos and exits 1 for anything unknown. No injection path.
  • JWT secret generationumask 077 && openssl rand -hex 32 > $@ sets restrictive permissions from creation. Commit 26599fa2 addressed this. No default secret committed.
  • ClickHouse access posture — empty password + ::/0 is intentional and safe: port 9000 is not published in compose.yaml (confirmed — no ports: on the clickhouse service). The comment in users.xml and the diff comment in otel-collector-config.yaml both document this clearly.
  • SIGNOZ_COMPOSE teardown-placeholder — lazy = expansion reads the secret at recipe-execution time; the 2>/dev/null || printf teardown-placeholder fallback keeps signoz-down/signoz-wipe/clean-all working after the secret has been wiped. No prereq on teardown targets.
  • load-dashboards.sh — two-phase validation (title non-null + no cross-file duplicates) before first API mutation; --max-time 30 on all curl calls; -fsS exits nonzero on HTTP errors; set -euo pipefail throughout.
  • standalone.signoz.yaml — explicit http:// in the wget healthcheck (commit 86af4e6e); host.docker.internal:host-gateway extra-host for Linux; WH_MQ_MAX_BYTES_GB: "2" cap with an inline comment explaining the OrbStack disk rationale; service_healthy gate on ClickHouse before WaveHouse starts.
  • dev-obs — dashboard loader is best-effort (|| echo); air starts unconditionally regardless of loader outcome; targets declared .PHONY throughout.
  • Docs syncCHANGELOG.md under [Unreleased], docs/deployment.md, docs/development.md, README.md, .gitignore — all updated in the same PR.

Ship it — implementation is correct, secure for a dev-only stack, and the documentation is thorough. Resolve any still-open threads from prior Claude rounds before merging (the ruleset's required_review_thread_resolution blocks on them).

@EricAndrechek EricAndrechek moved this from In progress to Backlog in WaveHouse Task Board May 18, 2026
EricAndrechek added a commit that referenced this pull request May 20, 2026
## Summary

Umbrella PR setting up shared Claude Code + AI agent infrastructure for
the WaveHouse team. Two work streams:

1. **AI rules drift cleanup** — corrected stale references that AI tools
(Claude Code, Gemini Code Assist, Copilot, CodeRabbit) were following
blindly.
2. **Claude Code native tooling** — committed `.claude/` configuration
and `.githooks/` so every teammate gets identical dev affordances out of
the box, with agent-specific gating layered on top.

The team just got Max 20x subscriptions across the board; this lands the
team-wide config so everyone is on the same agentic dev experience by
default.

## Scope

### 1. AI rules drift cleanup

- **17 doc-path references corrected** across AGENTS.md +
CONTRIBUTING.md to `docs/src/content/docs/*.md` (the actual Astro
Starlight location, not the old flat layout).
- **`.github/copilot-instructions.md` shrunk to a pointer** — was
drifting on Go 1.25 (vs current 1.26.3) and 60% coverage (vs current 80%
total / 70% unit per `.testcoverage.yml`).
- **`.gemini/styleguide.md`** — stale `#67` / 60% claim fixed (issue
closed, 70% restored); duplicated doc-sync bullet collapsed to defer to
AGENTS.md (already authoritative).
- **`.github/labeler.yml`** — dropped non-existent
`cmd/wavehouse-{api,worker}/**` entries; fixed
`tests/{compose.yaml,sdk/**}` → `tests/e2e/...`; added
`cmd/wavehouse/**` to `area/infra`.
- **`.github/prompts/pr-review.md`** — doc-sync list collapsed;
vestigial "tenant" wording dropped (no tenant model in WaveHouse);
hard-wrap reflowed (180 → 81 lines).
- **AGENTS.md** — `cmd/*/main.go` (plural) → `cmd/wavehouse/main.go`
(one binary); `tests/fixtures/` → `tests/e2e/fixtures/`; removed stale
"update `triage.yml` area enumeration" step (workflow now discovers
`area/*` labels dynamically); fixed internal-package count.
- **CONTRIBUTING.md** — vestigial "tenant isolation" wording removed.
- **TODO.md deleted** — audit summary below.

### 2. Claude Code native tooling

- **`.claude/`** — shared configuration: `settings.json` (deny rules +
worktree config + three hooks wired), `agents/pre-push-reviewer.md`,
`hooks/agent-bash-gate.sh` (PreToolUse Bash gate),
`hooks/review-marker.sh` (PostToolUse Agent marker writer),
`hooks/gofumpt-on-save.sh` (auto-format), `skills/pr-review-locally/`,
`skills/pr-sync-with-main/`, `commands/cover.md`.
- **`.githooks/`** — universal team hooks installed by `make tools`:
`pre-commit` runs `make verify`; `pre-push` requires
`tmp/ci-passed-<HEAD-sha>` marker (written by `make ci`).
- **`.config/wt.toml`** — worktrunk project hooks so parallel-agent
worktrees install `.githooks/` correctly.
- **AGENTS.md §"Agent PR Discipline"** — new section codifying the
agent-only ruleset:
- Drafts-only PR creation; human-only
ready/approve/request-changes/reviewer-add transitions.
- Bot reviewer re-triggers go through PR comments (`@coderabbitai
review`, `@gemini-code-assist`, `@claude` / `/review`).
- **Pre-push self-review mandatory** on PR branches: agent invokes
`pre-push-reviewer` subagent in fresh context. `ship_it` requires zero
findings at any severity — any `[MUST]` / `[SHOULD]` / `[MAY]` forces
iterate; the orchestrator loops review → fix → review until clean.
- **Honest-agent marker policy**: `--no-verify` regex-blocked + the
obvious marker-write idioms denied at the permission layer (`Bash(touch
tmp/ci-passed:*)`, `Write`/`Edit` on the canonical paths); everything
else is a documented rule, not regex-enforced. Bash can write a file by
a dozen paths and regex enforcement is a porous game of whack-a-mole.
- **`docs/src/content/docs/claude-code.md`** — contributor-facing page
documenting the four-layer model (universal git hooks → agent gate →
ergonomic hooks → skills/agents/commands), quick setup, and discipline
rules.
- **CHANGELOG.md** — `[Unreleased]` entry covering all of the above.

## Out-of-tree GitHub changes that pair with the AI-rules cleanup

Done via `gh` CLI as part of the same audit:

- **Closed #46** (Graceful Shutdown) — verified shipped in
`cmd/wavehouse/main.go:378-393` (SIGINT/SIGTERM → bounded shutCtx →
ingestStream.Stop → srv.Shutdown → promSrv.Shutdown).
- **Scope notes added to #44, #50, #94** with current-status / boundary
info (ldflags shipped vs `/version` remaining; DLQ shipped vs retry
remaining + scope boundary with #91; per-component logger source field
as a #94 complement).
- **Opened 4 new issues from orphan TODOs**: #143 (pprof), #144 (K8s
`/healthz` + per-dep health), #145 (RequireRoles fail-closed), #146
(split `internal/api/` into focused subpackages).

## TODO.md audit (one-time, for record)

| Bucket | Count | Disposition |
|--------|-------|-------------|
| Already shipped per closed issues (#11, #14, #16, #28, #40, #41, #42,
#45) + current code | ~12 | Deleted from TODO |
| Tracked as open issues (#32, #33, #34, #37, #39, #44, #48, #49, #50,
#51, #94) | ~12 | Kept as issues, scope notes added where useful |
| In-flight via open PRs (#83, #92, #119, #122, #125, #136, #137) | 4 |
Untouched |
| #46 Graceful Shutdown | 1 | Verified shipped, closed with comment |
| Orphan items | 4 | Split into #143-146 |
| Aspirational ("more tests", "update README") | 2 | Deleted — covered
by AGENTS.md doc-sync rules |

Projects #7 board + triage automation is now the single canonical
backlog.

## Test plan

- [x] `make ci` passes locally for each push (gated by
`.githooks/pre-push`)
- [x] CI green on the latest HEAD (8fbd7db)
- [x] PR-title-lint accepts the title (`chore: claude code native
improvements`)
- [x] All `docs/src/content/docs/*.md` paths in AGENTS.md resolve to
real files
- [x] Labeler workflow auto-labels correctly per the updated paths
- [x] `pre-push-reviewer` subagent loop reached `VERDICT: ship_it` with
zero findings under the strict rubric before the final push (validated
end-to-end across five iterations on this branch — each surfacing a real
doc-sync / off-by-one / quote-strip issue and forcing a fix before the
marker auto-wrote)
- [x] `agent-bash-gate.sh` quote-strip generalization sanity-tested
live: `echo "git push to deploy"` passes through; `git push --no-verify`
and `git commit --no-verify` still block (`bash -n` clean, JSON wiring
valid)
- [ ] Human review

## Related issues

- Closed during this work: #46
- Scope notes added: #44, #50, #94
- New follow-up issues created: #143, #144, #145, #146

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Claude Code integration: local pre-push reviewer with strict
ship/iterate/block verdicts, push gating via CI/review markers,
automatic review-marker creation, and a coverage-reporting command.

* **Documentation**
* Comprehensive Claude Code & agent docs, new skill guides for PR
review/sync, updated README/CONTRIBUTING/CHANGELOG/styleguide, and site
sidebar/page additions.

* **Chores**
* Added git and agent hooks, CI marker creation, worktrunk config,
labeler tweaks, and simplified Copilot instructions.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Wave-RF/WaveHouse/pull/147?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@EricAndrechek EricAndrechek moved this from Backlog to In progress in WaveHouse Task Board May 24, 2026
@EricAndrechek EricAndrechek changed the title feat(deploy): local SigNoz dev stack (#121) feat(deploy): local dev o11y stack (#121) May 24, 2026

@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: 7


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 30d43b4a-70fd-445a-ba47-1bff307de3d9

📥 Commits

Reviewing files that changed from the base of the PR and between 56bface and f140b87.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • Makefile
  • README.md
  • deployments/signoz/otel-collector-config.yaml
  • docs/src/content/docs/deployment.md
  • docs/src/content/docs/development.md
  • scripts/otel/aspire.sh
  • scripts/otel/grafana.sh
  • scripts/otel/otel-front.sh
💤 Files with no reviewable changes (1)
  • deployments/signoz/otel-collector-config.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CI
🧰 Additional context used
🪛 checkmake (0.3.2)
Makefile

[warning] 210-210: Target body for "preview-docs" exceeds allowed length of 5 lines (8).

(maxbodylength)


[warning] 635-635: Target body for "tools" exceeds allowed length of 5 lines (7).

(maxbodylength)


[warning] 635-635: Required target "all" is missing from the Makefile.

(minphony)

🪛 LanguageTool
docs/src/content/docs/deployment.md

[grammar] ~305-~305: Ensure spelling is correct
Context: ...se CH boot time; the default 30 × 10s = 5min is generous and works for compose-on-NA...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

README.md

[style] ~117-~117: This word has been used in one of the immediately preceding sentences. Using a synonym could make your text more interesting to read, unless the repetition is intentional.
Context: ...le. Use the binary or container; if you need programmatic access, the [TypeScript SD...

(EN_REPEATEDWORDS_NEED)

🪛 markdownlint-cli2 (0.22.1)
CHANGELOG.md

[warning] 31-31: Multiple headings with the same content

(MD024, no-duplicate-heading)

🪛 Shellcheck (0.11.0)
scripts/otel/grafana.sh

[info] 25-25: Note that A && B || C is not if-then-else. C may run when A is true.

(SC2015)

scripts/otel/aspire.sh

[info] 25-25: Note that A && B || C is not if-then-else. C may run when A is true.

(SC2015)

scripts/otel/otel-front.sh

[info] 23-23: Note that A && B || C is not if-then-else. C may run when A is true.

(SC2015)

🔇 Additional comments (8)
docs/src/content/docs/deployment.md (1)

106-107: LGTM!

Also applies to: 113-115, 234-235, 239-250, 292-293, 295-298, 305-306, 355-379

README.md (1)

32-32: LGTM!

Also applies to: 65-66, 73-82, 115-118, 121-122, 127-129, 141-146

CHANGELOG.md (1)

10-22: LGTM!

Also applies to: 26-27, 31-53, 56-58, 66-67, 70-71

Makefile (5)

248-258: LGTM!


619-620: Good practice: cleanup orphaned containers.

The docker rm -f with || true ensures leftover observability containers don't accumulate after script interruptions.


185-193: LGTM!


196-200: LGTM!


403-405: LGTM!

Comment thread docs/src/content/docs/development.md Outdated
Comment thread scripts/otel/aspire.sh
Comment thread scripts/otel/aspire.sh Outdated
Comment thread scripts/otel/grafana.sh
Comment thread scripts/otel/grafana.sh Outdated
Comment thread scripts/otel/otel-front.sh
Comment thread scripts/otel/otel-front.sh Outdated
@github-project-automation github-project-automation Bot moved this from In progress to In review in WaveHouse Task Board May 24, 2026
@github-actions github-actions Bot added the go Pull requests that update go code label May 24, 2026
@github-project-automation github-project-automation Bot moved this from In review to In progress in WaveHouse Task Board May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release documentation Improvements or additions to documentation go Pull requests that update go code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

feat(observability): o11y dev-stack cleanup + wire into make

4 participants