Lesson 3.6: Observability & operations
Difficulty: Intermediate | Duration: 12 min | Prerequisites: Lesson 3.5
Overview
Run Bowire like a production service: emit traces and metrics, watch plugin health, back up state, and disable misbehaving plugins.
Telemetry (OpenTelemetry)
Off by default — laptop installs stay quiet. Opt in:
bowire --telemetry --url http://localhost:5101
Bowire emits traces + Bowire-domain metrics through the canonical Kuestenlogik.Bowire Meter + ActivitySource:
bowire.invoke.count/bowire.invoke.durationbowire.discover.countbowire.plugin.loadbowire.mock.requests
Endpoint, headers and protocol come from the standard OTLP env vars:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
On shared multi-tenant installs (GDPR / HIPAA / SOX), drop the high-cardinality service + method dimensions:
bowire --telemetry --telemetry-strip-method-labels
Scheduled probes: bowire monitor
Telemetry tells you what happened while somebody was calling. A probe calls on its own schedule, so a service that nobody touched overnight still gets checked.
A probe is a JSON file: a name, a schedule, a severity, the assertions to hold, and the recording to replay.
# run the probes on their schedules, until Ctrl+C
bowire monitor run probes/*.json
# run each exactly once and exit — the CI / smoke-test shape
bowire monitor run probes/*.json --once
--once exits 2 when any probe fails or errors, which is what makes it usable as a gate rather than only as a daemon.
Every outcome is appended to a ledger — ~/.bowire/monitoring by default, --ledger-root to move it — so the history survives a restart and the Monitoring rail has something to render. The rail's empty state names this command, because a rail with no ledger behind it should say what fills it rather than look broken.
Alerts go out on transitions, not on every run — a service that has been down for an hour should not page somebody sixty times:
bowire monitor run probes/*.json --signal slack:https://hooks.slack.com/services/... --signal pagerduty:<routing-key>
Each scheme is served by an opt-in signaler package; an unknown scheme is reported and skipped rather than failing the run. The console channel is always on, so a probe run is never silent.
Plugin health & disable
- Every installed plugin exposes a health signal; the workbench's sidebar surfaces a badge, and the plugin lifecycle (load / unload / restart / reset-storage — Unit 5) is scriptable.
- Skip a misbehaving protocol plugin at startup:
bowire --disable-plugin grpc --disable-plugin signalr(repeat or comma-separate). Mirror for auto-discovered CLI subcommands with--disable-cli-command. - Update checks are opt-in (
--update-check) — never phone home by default.
Backup
Workspace state lives under ~/.bowire (recordings, environments, collections, flows) and, per-workspace, under ~/.bowire/workspaces/<id>/. Back that tree up; a .bww export bundles a workspace for transport. In containers, mount it as a volume so state survives restarts.
Key Takeaways
--telemetryis opt-in; metrics/traces flow through theKuestenlogik.BowireMeter/ActivitySource to any OTLP collector viaOTEL_EXPORTER_OTLP_*.--telemetry-strip-method-labelsfor shared installs that can't keep per-method cardinality.--disable-pluginisolates a bad plugin; update checks + telemetry never run unless you opt in.- Back up
~/.bowire(and per-workspace dirs);.bwwbundles a workspace. bowire monitor run --onceturns saved recordings into scheduled probes and exits 2 on failure; alerts fire on pass↔fail transitions, not on every run.
What's Next
Continue: → Lesson 3.7: Workspace hygiene
The gates that run before this: → Lesson 3.8: CI gates — lint, contracts, and one rollup