Skip to content

feat: Make the stack runnable, demoable, and tested#2

Merged
simonvanlierde merged 15 commits into
mainfrom
feat/runnable-stack-demo-ci
Jul 4, 2026
Merged

feat: Make the stack runnable, demoable, and tested#2
simonvanlierde merged 15 commits into
mainfrom
feat/runnable-stack-demo-ci

Conversation

@simonvanlierde

Copy link
Copy Markdown
Contributor

Before: you needed a Cloudflare token just to start the stack, and there was no way to see it working or to validate changes. Now:

  • just up: runs locally with no secrets. The tunnel is an optional overlay (just up-tunnel), pinned instead of :latest.
  • just demo: one command starts a small instrumented FastAPI service under load. Within a minute Grafana shows traces, metrics, and logs, all cross-linked (click a log's trace_id → the trace; click a latency dot → the exact trace).
  • just check: validates all compose files, Prometheus config + alert rules, collector config, YAML, workflows, and dashboards, using pinned containers. CI runs it on every push/PR plus a boot test.
  • Service Health (RED) dashboard: request rate, errors, latency for any service that sends traces, not just the demo.
  • Alert rules: collector down, export failures, high error rate. Tested live: stopped the collector, watched the alert fire, restarted, watched it resolve.
  • Docs: architecture diagram, quickstart, a real screenshot from the running demo, ADR, changelog.

Move cloudflared into an optional compose.tunnel.yml overlay (pinned to
2026.6.1 instead of :latest) so a fresh clone + .env.example + 'just up'
brings up Grafana locally. 'just up-tunnel' is the production path.
compose.demo.yml runs a tiny auto-instrumented FastAPI service plus a curl
load loop, emitting real OTLP traces, metrics, and trace-correlated logs.
'just demo' brings up the core stack with the overlay.
Target-down, OTel export failures, and >5% span error rate (from Tempo
span metrics). Evaluated by Prometheus, surfaced in Grafana Alerting; no
Alertmanager to keep the stack minimal.
check validates compose files (incl. overlays), Prometheus config+rules
via promtool, the collector config via otelcol validate, yamllint,
actionlint, and dashboard JSON — all in pinned containers, no host
installs. CI runs 'just check' plus a smoke job that waits for Grafana
/api/health. Also fixes a trailing space yamllint caught in
dependabot.yml.
Prometheus 3.x replaced the otlp-write-receiver feature flag with
--web.enable-otlp-receiver; with the old flag the collector's metrics
export 404ed and all OTLP metrics were silently dropped (surfaced by the
new demo). Also add a Loki derived field so trace_id arriving as OTLP
structured metadata links to Tempo, not just trace ids in the log body.
Request rate, error rate, and latency quantiles from Tempo span metrics
(with exemplars linking to traces), p95 from the service's own OTLP SDK
metrics, and a correlated logs panel. Works for any service that sends
traces, selected via a service variable. Demo app now logs at INFO so
non-error lines ship too.
Keeps CI a thin wrapper around the just contract; the same boot test now
runs locally with 'just smoke'.
…gelog

README gains a Mermaid diagram, a one-command demo section up top, a
genuine screenshot of the Service Health dashboard rendered from the
running demo, run/check/alerting docs, and a design-decisions section.
CHANGELOG.md starts the release history at v0.1.0.
Docstrings, return annotations, a named ERROR_RATE constant, targeted
S311 suppressions (randomness is jitter, not crypto), and an __init__.py
so the demo dir isn't an implicit namespace package.
ADR records the single-host OTLP-native architecture decision and its
alternatives; compose.storage.s3.yml is a deliberately commented stub
documenting the concrete Loki/Tempo → S3 path the README mentions.
@simonvanlierde
simonvanlierde merged commit 6daf58b into main Jul 4, 2026
2 checks passed
@simonvanlierde
simonvanlierde deleted the feat/runnable-stack-demo-ci branch July 4, 2026 11:48
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.

1 participant