Basics

How to Generate OpenTelemetry Test Data: telemetrygen, the Demo App and OTel Studio

Pick the right source of test telemetry for the question you are asking.

Sooner or later every observability project needs data that does not come from production: to try a new collector, build a dashboard, rehearse an alert or size a backend. There are four common ways to get it, and each is the right answer for a different question. This page compares them honestly so you can pick the one that fits.

The four options

OptionWhat you getBest forWatch out for
Your own application, instrumented with an OpenTelemetry SDKReal data from real codeVerifying your own instrumentation, context propagation and resource attributesNeeds a running, loaded system; hard to produce rare failures on demand
telemetrygen (from the OpenTelemetry Collector contrib project)A command-line tool that sends generated traces, logs or metrics at a set rate for a set durationQuick smoke tests: "does this receiver accept data?"Simple, uniform data; no service topology, no correlation between signals unless you build it
The OpenTelemetry Demo (the "astronomy shop")A complete microservices shop in many languages with real instrumentation and feature flags to cause failuresLearning how real instrumentation looks and trying a backend end to endMany containers to run; behaviour is fixed to that one application
OTel StudioA generator with 30 service topologies, six estate simulators, correlated logs, and anomaly and incident injection, controlled from a UI, a command line or an APIDashboards, alert rules, collector pipelines, capacity and cardinality tests, demos, CI checksThe data is synthetic: it cannot test your own SDK instrumentation

Start with the question, not the tool

What good test data looks like

Whatever generator you use, data that tests a pipeline well has these properties:

  1. Varied. Several services, several operations, a mix of fast and slow requests and of successes and errors. A processor that filters on status codes will pass a test with one hand-made 200 response and fail in production.
  2. Correlated. Logs carry the trace and span IDs of the span they were written in, and the same host or pod identity appears in traces and metrics.
  3. Controllable. You can raise the rate, add failures and stop it, so tests are repeatable.
  4. Marked. It is obviously test data. OTel Studio sets synth.generated: true on everything, so it can be filtered out of production views.
  5. Realistic in shape. Logs outnumber traces, which outnumber metric points. Volume tests with the wrong ratios give the wrong answers.

Examples side by side

A quick smoke test with telemetrygen:

telemetrygen traces --otlp-endpoint localhost:4317 --otlp-insecure --duration 10s --rate 5

The same idea with OTel Studio — a minute of correlated traffic from a realistic topology, from the command line:

docker run --rm ghcr.io/xplurdata/otel-studio:latest \
  node dist/headless.js --config load.yaml --duration 60s \
  --endpoint http://collector:4318 --protocol http

Both are valid; they answer different questions. Many teams use both — a one-line generator for "is it up?" and a topology-based one for everything after.

Keep going