Client Configuration
HeimdallClient Options
These options are passed when initializing theHeimdallClient:
Python Example
JavaScript Example
Tracing Decorator Options
trace_mcp_tool / traceMCPTool
Options for the MCP tool tracing decorator:Python SDK automatically captures parameter names using introspection, so
paramNames is not needed.Python Examples
JavaScript Examples
observe Options
Options for the general-purpose tracing decorator:Python Examples
JavaScript Examples
Client Methods
flush / flushAsync
Force send all pending spans to the backend:shutdown
Gracefully shutdown the client:Advanced Configuration
Batching Behavior
Spans are batched for efficient transmission:- Spans are collected until
batch_sizeis reached ORflush_interval_mselapses - Call
flush()to immediately send all pending spans - Call
shutdown()to flush and close the client
Debug Mode
Enable debug mode to see detailed logging:- Span creation events
- Batch transmission attempts
- Errors and retries
Disabling Tracing
Setenabled=False to completely disable tracing:
- All decorators become no-ops
- No data is sent to the backend
- Minimal performance overhead
Next Steps
Environment Variables
Configure using environment variables.
Tracing Overview
Learn how tracing works.