Spanport

Auth / API keys

OpenRouter-style DX: mint in the app, send as Bearer on every ingest request. Spanport stores SHA-256 hashes only.

Key format

PartValue
Prefixspc_live_ (production). spc_test_ reserved.
Secret24 random bytes, base64url
DisplayFirst 16 characters (prefix) in the dashboard
StorageSHA-256 hex of the full secret — never the raw key

Headers

Any one of these works on POST /v1/traces:

Authorization: Bearer spc_live_…
x-spanport-api-key: spc_live_…
x-api-key: spc_live_…

Environment variables

NameWhoPurpose
SPANPORT_API_KEYCustomer appYour Spanport ingest key
OTEL_EXPORTER_OTLP_HEADERSOTel SDKAuthorization=Bearer $SPANPORT_API_KEY
SPANPORT_DEMO_API_KEYOperatorsRe-seed local demo key after gateway restart
SPANPORT_EXPOSE_DEMO_KEYOperatorsSet 0 in production to hide demo plaintext from/v1/control/snapshot

Lifecycle

Prefer the dashboard for mint / revoke. Never log raw keys; gateway logs only the display prefix.