Synthetic telemetry · open source
Synthetic telemetry generator for testing observability pipelines.¶
Sonda generates metrics and logs with realistic patterns from a single static binary. Use it to test your pipelines, alerts, and dashboards before they break in production.
Try it¶
A Sonda scenario is a YAML file with three parts: a generator that produces values, an encoder that formats them, and a sink that sends them to a destination. Two commands set one up: sonda new --template creates a starter file, and sonda run runs it.
sonda new --template -o hello.yaml
wrote hello.yaml
sonda run hello.yaml --duration 3s
example_metric 1 1777243958972
example_metric 1 1777243959978
example_metric 1 1777243960981
■ example_metric completed in 3.0s | events 3 | bytes 90 | errors 0
Each line uses the Prometheus exposition format: metric_name value timestamp_ms. See the glossary for the full definition.
Edit hello.yaml to change the signal pattern. You can swap constant for sine, add labels, or point the sink at a real backend.
version: 2
kind: runnable
defaults:
rate: 2
duration: 5s
encoder:
type: prometheus_text
sink:
type: stdout
labels:
host: web-01
scenarios:
- id: cpu_usage
signal_type: metrics
name: cpu_usage
generator:
type: sine
amplitude: 50.0
offset: 50.0
period_secs: 4
cpu_usage{host="web-01"} 50 1777243958972
cpu_usage{host="web-01"} 85.35533905932738 1777243959525
cpu_usage{host="web-01"} 100 1777243959982
cpu_usage{host="web-01"} 85.35533905932738 1777243960481
Sonda includes a CLI (sonda) and an optional HTTP server (sonda-server). The CLI is enough for laptop and CI use. The server accepts scenarios over a REST API. The same scenario file runs from your laptop, from CI, or from sonda-server. For a guided walkthrough that pushes to Prometheus or Loki, see Getting Started.
No install required¶
The real Sonda engine runs in your browser, compiled to WebAssembly. Edit a scenario and watch the signal it produces — then run the same YAML unchanged with sonda run.
-
Edit scenario YAML and see the exact values Sonda will emit — every generator, operational alias, and encoder, with real compile errors.
-
Set a threshold and a
for:duration against a failure pattern and watch the alert go pending → firing → resolved, in sync with the signal.
What do you want to test?¶
Every one of these is a small YAML file. Pick the failure, not the framework.
Trigger, resolve, and debounce alerts with signals shaped like real failures.
Inject label churn on a schedule and watch what your TSDB does under it.
Export a Grafana panel from a real outage and replay it at the original cadence.
Why not a bash loop?¶
Honest answer: a bash loop piping to curl is fine for checking that the port
is open. It stops being fine the moment the shape of the data matters —
alert thresholds, rate() windows, cardinality limits, retention behavior.
| bash + curl | Avalanche | flog | Sonda | |
|---|---|---|---|---|
Realistic value shapes (sine, flap, leak) |
hand-rolled | — | — | ✓ |
Correlated failures (after:, while:) |
— | — | — | ✓ |
| Replay real incidents from CSV | — | — | — | ✓ |
| Metrics and logs, histograms, summaries | scripted | metrics only | logs only | ✓ |
| Remote-write, OTLP, Kafka, Loki, InfluxDB LP | curl-able only | remote-write | files/stdout | ✓ |
| Scheduled gaps, bursts, cardinality spikes | — | churn only | — | ✓ |
| Single static binary | n/a | ✓ | ✓ | ✓ |
Avalanche is excellent at raw cardinality volume and flog at log throughput — if that's the whole job, use them. Sonda is for when the pipeline has to be tested against telemetry that behaves like production.
Why Sonda¶
-
Fast and self-contained
A single 5 MB static binary. No runtime, no JVM, no Python. Starts in under 50 ms and runs anywhere a Linux container runs. The same binary works on your laptop, your CI runner, and as a Kubernetes Job.
-
Realistic signal patterns
Metrics with sine, sawtooth, step, and spike value patterns. Logs with bursty distributions. Histograms with realistic latency tails. Match real production data on schema, cardinality, and failure modes. Not only on volume.
-
Supports your pipeline's protocols
Encoders write formats like Prometheus text, InfluxDB line protocol, JSON, syslog, OTLP, and Prometheus remote-write. Sinks send data to stdout, files, TCP/UDP, HTTP, Kafka, Loki, and OTLP collectors. Pick an encoder and a sink. No extra setup needed per stack.
-
Scenarios as YAML files
Scenarios are YAML files. Check them into git, review them in pull requests, and template them. Override any field with CLI flags or
SONDA_*env vars. No need to fork the file.
Where to next¶
-
Install Sonda, stream your first metric, and send it to a real backend.
-
Organize runnable scenarios and composable packs in a catalog directory. Discover them with
sonda list --catalog <dir>and run them withsonda run @name. -
Trigger, resolve, and validate alert rules with realistic metric patterns. Covers thresholds, correlation, cardinality, histograms, and recording rules.
-
Run
sonda-serveras a long-lived HTTP control plane and submit scenarios over the REST API. Useful for CI and synthetic-monitoring fleets.
Part of the Modern Network Observability ecosystem¶
-
The hub: book, workshops, lab, and the broader project Sonda integrates with.
-
One workday on the new on-call rotation. Covers telemetry, dashboards, alerts, and AI-assisted ops in four hours.