SDK configuration
API key is in a secret manager, not hardcoded
zsp_ API key should never appear in source code or committed to version control. Set it as an environment variable and read it at runtime:grep -r "zsp_" src/ — this should return no matches.environment is set to 'production'
storePrompts is configured
storePrompts defaults to true — prompt and completion text are stored with PII redaction applied before transmission. If you don’t need prompt storage, set it to false to reduce data sent:redactKeys list covers any sensitive patterns your prompts may contain.sampleRate is tuned for your traffic volume
Flush is called before process exit (serverless only)
flush() is called at the end of every handler. See the Serverless guide.redactKeys covers all PII fields in your tags
tags key your application sends. Add any fields that contain sensitive data to redactKeys:userId and sessionId are set on user-facing calls
withZespanContext for all requests that involve authenticated users:Dashboard setup
At least one alert rule is configured
- Metric:
error_rate - Condition:
>0.05 (5%) - Window: 15 minutes
- Notify: your on-call email or Slack webhook
Cost alert is configured
- Metric:
cost_usd - Condition:
>your daily budget - Window: 60 minutes
Run the Cost Optimizer once before launch
Verify traces are appearing in the right project
environment tag shows production.Security
One API key per service
API key rotation schedule is documented
Team members have the right roles
Member role, not Admin. Admins can modify alert rules, guardrails, and SDK config.Quick verification after deployment
After deploying, run this end-to-end check:- Make one LLM call through your application
- Wait 10–15 seconds
- Open the Zespan dashboard and navigate to Traces
- Confirm the trace appears with
environment: production, the correct model, non-zero token counts, and a non-zero cost
debug: true in your SDK and redeploy — the console output will show whether events are being created and whether flushes are succeeding.

