console/scripts/seed-traces
Laurin Quast 4f70fc9555
feat: otel telemetry collection and dashboard (#6796)
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
Co-authored-by: Dotan Simha <dotansimha@gmail.com>
Co-authored-by: Denis Badurina <denis@denelop.com>
2025-10-10 14:06:02 +02:00
..
intercept-server.mts feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
README.md feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-introspection.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-my-profile.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-products-overview.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-user-review-error-missing-variables.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-user-review-not-found.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
sample-user-review.json feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00
seed-traces.mts feat: otel telemetry collection and dashboard (#6796) 2025-10-10 14:06:02 +02:00

Readme

Each of the JSON file in this folder contains an array of requests sent to the otel-collector for the specific GraphQL operation.

All the files will be parsed and used as a template for seeding the clickhouse database with somehow realistic trace data.

Usage

Then run the following script:

HIVE_ORGANIZATION_ACCESS_TOKEN=hvo1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= \
HIVE_TARGET_REF=the-guild/otel-demo/development \
node --experimental-strip-types seed-traces.mts

You can adjust the amount of days you want to seed by setting USAGE_DAYS (e.g. USAGE_DAYS=5 will seed the last 5 days). By default we seed the last 14 days.

You can adjust how frequent the reporting interval is by setting USAGE_INTERVAL (e.g. USAGE_DAYS=20). By default the value is 20 (minutes).

Adding more fixtures

In case you want to add additional traces starte the intercept server (interspect-service.mts), point the gateway to that endpoint and copy the output to a new file within this folder.