Synthetic telemetry · v1.9
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.
example_metric 1 1777243958972
example_metric 1 1777243959978
example_metric 1 1777243960981
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.
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.