telemetrygen
Telemetrygen
Generate synthetic OpenTelemetry telemetry with telemetrygen from opentelemetry-collector-contrib.
Quick orientation
telemetrygen has three subcommands -- traces, metrics, logs -- each exporting via OTLP to a collector or backend. The default transport is gRPC on port 4317; add --otlp-http to switch to HTTP on port 4318.
Every command needs at least a subcommand and typically --otlp-insecure for local development (TLS is on by default).
Workflow
- Pick the signal --
traces,metrics, orlogs. - Set the endpoint -- defaults to
localhost:4317(gRPC) orlocalhost:4318(HTTP). Use--otlp-endpointto override. - Choose count or duration -- use
--traces/--metrics/--logsfor a fixed count per worker, or--durationfor time-based generation. Duration overrides count when both are set. - Control throughput -- total rate =
--workersx--rate. Without--rate, generation runs at max speed (dangerous against real backends). - Add identity and attributes --
--servicesets the service name;--otlp-attributesadds resource-level attributes;--telemetry-attributesadds span/metric/log-level attributes. - Review the anti-patterns below before running against shared or production infrastructure.
More from ollygarden/opentelemetry-agent-skills
sdk-setup
OpenTelemetry SDK initialization and configuration. Use when setting up or reviewing TracerProvider, MeterProvider, or LoggerProvider; choosing exporters, processors, or propagators; configuring OTLP transport; or extending an existing SDK setup for new signals. Use this skill whenever the task involves wiring up the OpenTelemetry SDK, even if the user only mentions "add tracing" or "set up metrics" without saying "SDK.
8sdk-versions
OpenTelemetry SDK and package version lookup across languages. Use when choosing the latest compatible released OpenTelemetry SDK or package version and locating setup docs or examples.
8semantic-conventions
OpenTelemetry semantic convention lookup and naming guidance. Use when selecting released semantic convention groups, attributes, or span naming rules, or when checking semantic convention compliance.
8manual-instrumentation
OpenTelemetry best practices for manual instrumentation. Use when adding, changing, or reviewing OpenTelemetry instrumentation in code. Guidance to choose runtime boundaries, choose signals, apply semantic conventions, handle propagation, control cardinality, and verify the result.
8span-events-to-logs-migration
Migrate OpenTelemetry Span Events (AddEvent, RecordException) to the Logs API following the OTEP 4430 deprecation plan. Use when migrating instrumentation from span events to log-based events, reviewing code that still uses AddEvent or RecordException, or planning a migration across a codebase.
8go-sdk
>
7