Skip to main content
The exporterAuth field on TelemetryConfig takes an AuthConfig. The same credential is forwarded to the safety-check API as x-api-key.

Fields

'bearer' | 'apiKey' | 'basic'
required
Which authentication scheme to use.
string
Required when type: 'bearer'. Sent as Authorization: Bearer <token>.
string
Required when type: 'apiKey'. Sent as x-api-key: <apiKey>.
string
Required when type: 'basic'. Currently a no-op in the exporter (the Authorization: Basic ... header is commented out — track upstream).
string
Required when type: 'basic'. Same caveat as username.

Per-type validation

ConfigValidator enforces:
  • bearer requires token.
  • apiKey requires apiKey.
  • basic requires both username and password.
Missing fields throw at instrumentServer time.

Examples

Bearer

API key

Basic (validated, header not yet emitted)

See Authentication for the full guide.