telemetrygen is the OpenTelemetry Collector Contrib data generator. It emits synthetic OTLP logs, traces and metrics, and exposes flags that let you shape the data: multiple services, log severities, span statuses and child spans, and different metric types. Use it to confirm that a ClickStack OpenTelemetry collector is accepting data and that varied, realistic events surface in the ClickStack UI.
This guide assumes the collector is already running with OTLP endpoints on 4317 (gRPC) and 4318 (HTTP).
- Managed ClickStack
- ClickStack Open Source
1
Prerequisites
This guide assumes you have completed the Getting Started Guide for Managed ClickStack and have an OpenTelemetry collector running with the OTLP gRPC (4317) and HTTP (4318) endpoints reachable from the machine you run telemetrygen on. If you secured the collector with an OTLP_AUTH_TOKEN, keep that value handy.2
Install telemetrygen
Runtelemetrygen from its Docker image (no install required). Define a small wrapper so the commands below stay readable; --add-host lets the container reach a collector listening on the host:localhost instead:3
Set environment variables
Export the auth token if the collector is secured:Unsecured collectorThe ClickStack OpenTelemetry collector is unauthenticated by default. If you haven’t followed Securing the collector to set an
OTLP_AUTH_TOKEN, drop the --otlp-header line from the helper below.tg helper so each command only specifies what varies (service, severity, status, attributes):4
Generate logs
Send logs as a realistic mix of severities across services, mostly informational with a warning and an error rather than one uniform stream:--servicesetsservice.nameso events are attributable to a service.--severity-textand--severity-numberset the level (severity-numberranges from 1 to 24).--bodysets the log message.--otlp-attributessets resource-level attributes (key="value",key=true, orkey=<integer>).--telemetry-attributessets per-record attributes.
5
Generate traces
Send multi-span traces from several healthy services plus one failing dependency. This gives the Service Map a realistic shape, mostly healthy with one erroring service, and populates the error views:--child-spansgenerates that many child spans per trace, giving each trace real depth.--span-durationsets how long each span lasts (for example120ms,2s).--status-codeis one ofUnset,Error,Ok(or0,1,2). UseErrorto exercise error views.--span-linksadds links between spans.--workersruns several generators in parallel for a higher, more varied volume.
6
Generate metrics
Send the three common metric types so dashboards have counters, gauges, and a distribution. Unlike some generators,telemetrygen honors --duration for metrics, so no manual stop is needed:--metric-type accepts Gauge, Sum, Histogram, or ExponentialHistogram. --otlp-metric-name names the series so you can find it in the UI, and --aggregation-temporality is delta or cumulative.7
Verify in ClickStack
Open the ClickStack UI from the ClickHouse Cloud console. In theSearch view, set the time range to Last 15 minutes and switch the source between Logs and Traces. Filter on ServiceName to see the frontend, checkout, cart, and payment services, and on SeverityText to find the warning and error log lines. Open a payment trace to see the child spans and the error status. Open the Chart Explorer, select Metrics, and chart one of the metric names you set above (for example http.server.requests) to verify metrics ingestion.