Skip to main content

Getting Started with Observability

Basalt Observability is built on OpenTelemetry and designed to be integrated into any Python application with minimal code changes.

1. Install the SDK

2. Initialize Basalt

Set your API key as an environment variable:
Initialize the client in your application:

3. Add Tracing to your Code

Use @start_observe for your entry points (like an API handler) and @observe for nested operations (like LLM calls or tool use).
basalt.shutdown() permanently destroys the global OpenTelemetry TracerProvider. Call it exactly once, at process exit. Do not call it between loop iterations or between HTTP requests — subsequent traces would be silently dropped. See Core Concepts for full lifecycle guidance.

4. View your Traces

Run your script, then head over to the Basalt Dashboard to see your traces in real-time.

Next Steps