Check that the key matches your environment (dev vs production)
Ensure the API key hasn’t been revoked
// Development key (routes to dev environment)configure({ apiKey: "dev_abc123" });// Production key (routes to production)configure({ apiKey: "tcc_abc123" });
Wrong environment
Symptom: Data appears in development dashboard but not production (or vice versa).Solution:API keys automatically route to environments:
Keys starting with dev_ → Development
All other keys → Production
Ensure you’re using the correct API key for your environment.
Symptom: Errors when using Observatory in React Server Components.Solution:Observatory’s OpenTelemetry integration works automatically in Server Components. For client components, use the widget package.
Or just enable debug mode to see payloads in console:
configure({ debug: true });
Can I use Observatory in production?
Yes! Observatory is designed for production use. The SDK:
Uses async requests that don’t block your application
Includes automatic retries for transient failures
Gracefully handles missing API keys (logs warning and continues)
Has minimal performance overhead
What happens if the API is down?
The SDK will:
Retry the request up to 2 times with exponential backoff
Log an error to console after retries are exhausted
Continue running your application normally
Your application will not crash or hang if Observatory is unavailable.
How do I handle timeouts?
Runs have an auto-flush timeout that defaults to 20 minutes:
// Per-run timeoutconst r = run({ timeout: 600000 }); // 10 min// Global timeoutconfigure({ runTimeout: 600000 });// Disable timeoutconst r = run({ timeout: 0 });
If a run exceeds the timeout, it’s automatically sent with error status.
Can I delete or modify data after sending?
Once data is sent to Observatory, it cannot be modified via the SDK. Contact support if you need to delete or modify historical data.
How do I instrument streaming responses?
For streaming responses, collect the full response before ending the step:
const r = run();r.prompt("Generate a story");const s = r.step();s.prompt(JSON.stringify(messages));let fullResponse = "";for await (const chunk of stream) { fullResponse += chunk; // Stream to user yield chunk;}s.response(fullResponse);s.end();r.response(fullResponse);await r.end();
How do I handle concurrent runs?
Each run is independent and can be processed concurrently: