Skip to main content
This page provides a complete reference for all configuration options available in the Heimdall SDKs.

Client Configuration

HeimdallClient Options

These options are passed when initializing the HeimdallClient:

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:
Always call flush() before your application exits to ensure all traces are sent.

shutdown

Gracefully shutdown the client:

Advanced Configuration

Batching Behavior

Spans are batched for efficient transmission:
  • Spans are collected until batch_size is reached OR flush_interval_ms elapses
  • 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:
This will log:
  • Span creation events
  • Batch transmission attempts
  • Errors and retries

Disabling Tracing

Set enabled=False to completely disable tracing:
When disabled:
  • 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.