How the pieces fit together
Raw telemetry stays in ClickHouse. The local
watch.db SQLite file stores
incident state, reports, and pending deliveries—not the telemetry stream.
The Collector’s exporter creates and fills the telemetry tables; OpenSRE’s
read-only account does not create them or manage their schema.
Start the demo
Use a source checkout with Docker Compose and a configured OpenSRE API model. A tool-enabled model CLI is not supported for this bounded investigation. For Telegram, first runuv run opensre integrations setup telegram and choose
your own chat or a group the bot can access—not another bot’s account.
Omit --telegram for terminal-only reports.
From the repository root:
init creates random demo credentials in an owner-readable .env and starts
with the fault disabled. It refuses to overwrite an existing credential file.
Keep the checkout in a directory shared with Docker Desktop. Port 18123
must be free. Only ClickHouse HTTP is published, bound to 127.0.0.1;
OTLP, payment, and flagd stay inside the Compose network.
Load the demo reader credential in a Bash-compatible terminal, then start the watch:
--once processes one completed
window and exits. --chat-id optionally overrides the configured Telegram destination.
Stop with Ctrl-C; retained reports and pending deliveries survive restart.
Run the same command with the same state file to resume. Changing source, rule,
bot identity, or destination requires a new state file.
Understand the watch configuration
The includedwatch.yaml is ready for this demo:
Keep passwords out of YAML. The setup command creates the demo password;
loading
.env above supplies OPENSRE_TELEMETRY_CLICKHOUSE_PASSWORD to OpenSRE.
What happens on each check?
For example, a check at 12:01:15 examines 12:00:30–12:01:00: a completed 30-second window with a 15-second allowance for ingestion.
This watches application telemetry, not Collector health. An unknown result
does not tell you whether the Collector stopped, the application stopped, or
there was simply no traffic. Previously stored data may remain eligible briefly
after collection stops; missing data is not detected instantly.
Keep the watch terminal running: closing it pauses detection even if the
Collector keeps storing data. Restarting resumes recent checks, but does not
backfill missed windows. A slow investigation can also skip windows.
Reproduce failure and recovery
In another terminal:docker compose -f examples/telemetry-payment/compose.yaml restart flagd.
The traffic generator sends synthetic requests to the unmodified upstream
payment service. The official paymentFailure flag rejects these requests;
emitRawPii stays disabled. No real payment provider is contacted.
View complete retained reports without contacting ClickHouse or Telegram:
/triage reports --state <file>. The continuous watch
runs in a separate terminal, not inside the REPL.
Telegram delivery retries the saved report, not the completed model analysis.
Delivery is at-least-once: a crash after Telegram accepts a message but before
OpenSRE saves its acknowledgment can produce a duplicate. Notifications carry
an incident ID. Keep the local state file private; it contains investigation reports.
Measurement and investigation limits
The demo’s application counter counts successful payments only. The Collector therefore derives a delta request counter from unsampled SERVER spans.watch.yaml explicitly maps that metric and its status/kind dimensions. Do not
use this rule on sampled traces or substitute a cumulative counter: the reader
rejects non-delta data. An application-native all-requests/error counter is a
better production source when available, but requires an appropriate mapping.
The model sees only the selected evidence from the incident’s service,
environment, and time window, with a 90-second analysis deadline. It cannot
run tools, execute SQL, or make changes to the application. If evidence or the
model is unavailable, OpenSRE saves a partial report with the cause marked
unknown. A report is an evidence-based explanation, not a guaranteed root cause.
The span sample is not a collection of complete distributed traces.
Connect your own application
Use standard OpenTelemetry instrumentation and OTLP. Supplyservice.name
and deployment.environment.name. Your SDK or existing Collector can send to
a secured Collector configured to write the same tables. This demo’s private,
unauthenticated OTLP listeners must not be exposed publicly.
The included Collector configuration is a complete, pinned ClickStack
Map-schema configuration, not a HyperDX SDK requirement. OpenSRE is not an
OTLP receiver: ClickHouse supplies the queryable history. Another backend
needs an implementation of the evidence-reader contract; OTLP alone does not
standardize historical queries. The current adapter supports the included
Map-schema tables, not arbitrary ClickHouse or ClickStack JSON schemas.
For another ClickHouse source, copy watch.yaml, set its connection and rule,
and provide OPENSRE_TELEMETRY_CLICKHOUSE_PASSWORD through the environment or
OpenSRE’s credential store. Use a dedicated readonly=2 account with SELECT
only on otel_metrics_sum, otel_traces, and otel_logs; never use collector
or administrator credentials. Use TLS for remote connections.
Known credentials, card-like numbers, and emails are redacted before model
synthesis. This is not comprehensive DLP: remove sensitive content at collection
time before using real telemetry with a model or Telegram. Resource/attribute
maps are not exported into the report. Treat this as a single-owner reference
pilot, not a hosted multi-tenant ingestion service.