Skip to content

Credentials

synthkit reads credentials from a .env file (gitignored — never commit secrets). Each signal type uses its own credential triplet. The self-observability path uses an entirely separate Grafana Cloud stack — never GC_TOKEN.

The two stacks

StackPurposeToken var
Synthetic-data stackWhere your fake telemetry lands (dashboards, alerts, demos)GC_TOKEN
Self-obs stackWhere synthkit's own process telemetry lands (RED metrics, traces, profiles)GC_SELF_OTLP_PASSWORD / GC_PYROSCOPE_PASSWORDnever GC_TOKEN

Keep these separate. Using GC_TOKEN for self-observability would intermingle the generator's own signals with the synthetic data.


Credential reference

Synthetic data sinks

A single Cloud Access Policy (CAP) token with metrics:write, logs:write, traces:write, and profiles:write scopes covers all four synthetic-data sinks.

PurposeEnv varsNotes
Metrics (Mimir, Remote-Write v2)GC_TOKEN, GC_PROM_RW, GC_PROM_USERGC_PROM_RW = push URL; GC_PROM_USER = Mimir instance ID
Traces (Tempo, OTLP)GC_TOKEN, GC_OTLP_ENDPOINT, GC_OTLP_USERGC_OTLP_ENDPOINT = base OTLP gateway URL (…/otlp); GC_OTLP_USER = stack ID
Logs (Loki)GC_TOKEN, GC_LOKI, GC_LOKI_USERGC_LOKI = Loki push URL; GC_LOKI_USER = Loki instance ID
Profiles (Pyroscope)GC_TOKEN, GC_PROFILES_URL, GC_PROFILES_USEROptional; absent = profiles disabled

GC_TOKEN is the password for all four sinks. The user ID for each sink differs (Mimir ID vs stack ID vs Loki ID — they are different numbers).

RUM / Faro (optional)

Needed only for blueprints with rum: true on a workload, or app workload nodes with a RUM lane.

Env varValue
GC_FARO_COLLECTORFaro collector URL, e.g. https://faro-collector-<region>.grafana.net/collect/<app-key>
GC_FARO_APP_KEYFaro application key

Synthetic Monitoring (optional)

Used only by the cmd/sm-provision provisioner, not by the main emitter. The SM token is a separate bearer token — not GC_TOKEN.

Env varValue
GC_SM_URLSM API URL, e.g. https://synthetic-monitoring-api-<region>.grafana.net
GC_SM_TOKENSM API bearer token

See Synthetic Monitoring for the two-phase startup.

Fleet Management (optional)

Env varValue
GC_FM_URLFM API URL, e.g. https://fleet-management-prod-0NN.grafana.net
GC_FM_STACK_IDFM basic-auth username = Grafana Cloud stack ID (NOT GC_PROM_USER)
GC_FM_TOKENCAP token with fleet-management:write scope

See Fleet Management.

Self-observability — OTLP (optional)

Sends synthkit's own RED metrics, traces, and operational logs to a separate stack.

Env varValue
SELFOBS_ENABLEDtrue to enable (default false)
GC_SELF_OTLP_ENDPOINTOTLP gateway base URL for the self-obs stack
GC_SELF_OTLP_USERSelf-obs stack ID
GC_SELF_OTLP_PASSWORDSelf-obs CAP token — never GC_TOKEN

Self-profiling — Pyroscope (optional)

Sends the synthkit process's continuous profiles to a separate stack. Follows SELFOBS_ENABLED and is suppressed under DRY_RUN.

Env varValue
GC_PYROSCOPE_URLProfiles endpoint, e.g. https://profiles-prod-XXX.grafana.net
GC_PYROSCOPE_USERProfiles instance ID
GC_PYROSCOPE_PASSWORDProfiles CAP token — never GC_TOKEN

Getting credentials from Grafana Cloud

  1. Open your Grafana Cloud stack → Security → Access policies.
  2. Create a policy with the scopes you need (at minimum: metrics:write, logs:write, traces:write).
  3. Generate a token.
  4. Find the endpoint URLs under Details for each data source (Mimir, Loki, Tempo, Profiles).

If you use gcx, gcx config get --context <your-stack> prints the endpoint URLs for the configured context.


Filling in .env

cp .env.example .env
# open .env in your editor and fill in the values

Comment placement

Docker Compose's env_file does not strip inline comments. Put comments on their own line — VALUE=foo # comment makes # comment part of the value. .env.example demonstrates the correct style throughout.

The minimum set for a live synthetic push: GC_TOKEN + GC_PROM_RW/GC_PROM_USER + GC_OTLP_ENDPOINT/GC_OTLP_USER + GC_LOKI/GC_LOKI_USER. Leave optional blocks empty to disable RUM, SM, FM, and self-obs.

See Configuration for the full environment variable reference including behaviour knobs (TICK_DEFAULT, SEND_SHARDS, queue tunables, etc.).