Setup
Configure tracing in your application to start capturing traces.
Installation
Tracing is included in the Rhesis SDK (v0.6.0+):
Initialization
Initialize the RhesisClient to set up the tracing infrastructure:
Note: The @observe decorator requires RhesisClient to be initialized. Without initialization, a RuntimeError is raised.
Environment Variables
Configure via environment variables:
Then initialize without explicit parameters:
Disabling Tracing
To disable all tracing and connector functionality (useful for CI/CD or testing), set:
Accepted values: true, 1, yes, on (case-insensitive)
When disabled:
@endpointand@observedecorators return functions unmodified- No telemetry initialization occurs
- No network requests are made to Rhesis
- All method calls become no-ops
Batch Configuration
Traces are batched for efficient export:
| Setting | Default | Description |
|---|---|---|
| Queue Size | 2048 | Maximum spans buffered in memory |
| Batch Size | 512 | Spans per HTTP request |
| Export Interval | 5s | Time between batch exports |
Verify Setup
Test that tracing is working:
Next: Learn about the decorators available for tracing your functions.