motel

module
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: Apache-2.0

README

motel

CI Go Report Card Go Reference

motel /mōˈtel/ noun mock opentelemetry. A synthetic signal generator for testing and developing observability pipelines.

motel is a synthetic OpenTelemetry generator.

Describe your distributed system in YAML and motel generates realistic traces, metrics, and logs — no live services required.

Install

brew tap andrewh/tap
brew install motel

Or with Go:

go install github.com/andrewh/motel/cmd/motel@latest

Or download a binary from the releases page.

Quick start

# my-topology.yaml
version: 1

services:
  gateway:
    operations:
      GET /users:
        duration: 30ms +/- 10ms
        error_rate: 1%
        calls:
          - users.list
  users:
    operations:
      list:
        duration: 15ms +/- 5ms

traffic:
  rate: 10/s
# Validate the topology
motel validate my-topology.yaml

# Generate traces to stdout
motel run --stdout --duration 5s my-topology.yaml

# Send to an OTLP collector
motel run --endpoint localhost:4318 --duration 30s my-topology.yaml

What it does

motel reads a YAML topology file describing services, operations, call patterns, latency distributions, and error rates. It walks the topology tree once per trace, producing spans that look like they came from real instrumented services. Every span carries synth.service and synth.operation attributes, and all signals include a motel.version resource attribute, so synthetic traffic is never mistaken for real data.

Use cases:

  • Test observability pipelines — feed realistic traces into collectors, backends, or dashboards without deploying services
  • Load test — generate trace traffic at controlled rates with configurable patterns (uniform, diurnal, bursty, custom)
  • Demo and prototype — show what your system's telemetry will look like before building it
  • Import real tracesmotel import infers a topology from existing trace data, so you can replay and modify production patterns

Signals

By default motel emits traces. Use --signals to add metrics and logs:

motel run --stdout --signals traces,metrics,logs --slow-threshold 200ms topology.yaml

All three signal types are driven by the same topology.

Documentation

Licence

Apache 2.0

Directories

Path Synopsis
cmd
motel command
Synthetic OpenTelemetry generator Reads a YAML topology definition and emits traces, metrics, and logs via OTel SDK
Synthetic OpenTelemetry generator Reads a YAML topology definition and emits traces, metrics, and logs via OTel SDK
pkg
pipelinetest
Package pipelinetest provides primitives for testing OTLP pipelines: an in-process OTLP/HTTP sink that captures exported spans, and a subprocess-managed OpenTelemetry Collector.
Package pipelinetest provides primitives for testing OTLP pipelines: an in-process OTLP/HTTP sink that captures exported spans, and a subprocess-managed OpenTelemetry Collector.
semconv
Mapping functions that create attribute value generators from semantic convention definitions.
Mapping functions that create attribute value generators from semantic convention definitions.
synth
Per-operation attribute value generators for wide span emission Supports static, weighted, sequence, boolean, range, and normal distribution values
Per-operation attribute value generators for wide span emission Supports static, weighted, sequence, boolean, range, and normal distribution values
synth/traceimport
Package traceimport infers a motel topology from recorded trace data.
Package traceimport infers a motel topology from recorded trace data.
third_party
semconv
Package semconv provides embedded OTel semantic convention model files.
Package semconv provides embedded OTel semantic convention model files.
tools
dgg2motel command
dgg2motel converts call-graph JSON files produced by DGG (https://github.com/dufanrong/DGG) into motel topology YAML.
dgg2motel converts call-graph JSON files produced by DGG (https://github.com/dufanrong/DGG) into motel topology YAML.
dgggen command
dgggen generates synthetic call-graph JSON in DGG format (https://github.com/dufanrong/DGG) with shape distributions drawn from production measurements reported in Du et al., "DGG: A Novel Framework for Microservice Call Graph Generation Based on Realistic Distributions" (ICWS 2024), which characterises Alibaba production traces.
dgggen generates synthetic call-graph JSON in DGG format (https://github.com/dufanrong/DGG) with shape distributions drawn from production measurements reported in Du et al., "DGG: A Novel Framework for Microservice Call Graph Generation Based on Realistic Distributions" (ICWS 2024), which characterises Alibaba production traces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL