> ## Documentation Index
> Fetch the complete documentation index at: https://tracevell.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python Instrumentation

## Laminar.initialize(...)

Initialize Tracevell tracing and auto-instrumentation.

**Parameters:**

| Name | Type | Default | Description |
| - | - | - | - |
| `project_api_key` | `str` | `None` | Project API key (defaults to `LMNR_PROJECT_API_KEY`) |
| `base_url` | `str` | `https://api.lmnr.ai` | Base URL |
| `base_http_url` | `str` | `None` | OTLP HTTP base URL |
| `http_port` | `int` | `443` | OTLP HTTP port |
| `grpc_port` | `int` | `8443` | OTLP gRPC port |
| `instruments` | `set[Instruments]` | `None` | Enable only these instruments |
| `disabled_instruments` | `set[Instruments]` | `None` | Disable these instruments |
| `disable_batch` | `bool` | `False` | Disable batching span processor |
| `max_export_batch_size` | `int` \| `None` | `None` | Batch size (defaults to `64` when `None`) |
| `flush_by_size` | `bool` | `False` | Also flush a batch when its payload would exceed `max_export_batch_size_bytes`. See [Batching](https://tracevell.com/docs/sdk/batching.md) |
| `max_export_batch_size_bytes` | `int` \| `None` | `None` | Approximate max bytes per batch (defaults to 32 MiB). Only used when `flush_by_size` is True |
| `export_timeout_seconds` | `int` \| `None` | `None` | Export timeout (defaults to `30` when `None`) |
| `set_global_tracer_provider` | `bool` | `True` | Set global OTEL tracer provider |
| `otel_logger_level` | `int` | `logging.ERROR` | OTEL logger level |
| `session_recording_options` | `SessionRecordingOptions` | `None` | Browser session recording options |
| `force_http` | `bool` | `False` | Force OTLP HTTP exporter |
| `metadata` | `dict[str, AttributeValue]` | `None` | Global trace metadata |
| `release` | `str` \| `None` | `None` | Release stamped on every span, usually the git commit SHA. When `None`, read from `LMNR_RELEASE`, then deploy platform variables, then `.git`. See [Agent versions](https://tracevell.com/docs/tracing/agent-versions.md#attach-a-release) |

**Returns:** `None`

## Instruments

Enum of available auto-instrumentations.

```python theme={null}
from lmnr import Tracevell, Instruments

# Enable only specific instruments
Laminar.initialize(
    instruments={Instruments.OPENAI, Instruments.ANTHROPIC}
)

# Disable specific instruments
Laminar.initialize(
    disabled_instruments={Instruments.LANGCHAIN}
)
```

**Available instruments:**
`ALEPHALPHA`, `ANTHROPIC`, `BEDROCK`, `BROWSER_USE`, `BROWSER_USE_SESSION`, `BUBUS`, `CHROMA`, `CLAUDE_AGENT`, `COHERE`, `CREWAI`, `CUA_AGENT`, `CUA_COMPUTER`, `GOOGLE_GENAI`, `GROQ`, `HAYSTACK`, `KERNEL`, `LANCEDB`, `LANGCHAIN`, `LANGGRAPH`, `LITELLM`, `LLAMA_INDEX`, `MARQO`, `MCP`, `MILVUS`, `MISTRAL`, `OLLAMA`, `OPENAI`, `OPENHANDS`, `OPENTELEMETRY`, `PATCHRIGHT`, `PINECONE`, `PLAYWRIGHT`, `QDRANT`, `REPLICATE`, `SAGEMAKER`, `SKYVERN`, `TOGETHER`, `TRANSFORMERS`, `VERTEXAI`, `WATSONX`, `WEAVIATE`.

***

## SessionRecordingOptions

Browser session recording configuration.

```python theme={null}
from lmnr import SessionRecordingOptions, MaskInputOptions

options = SessionRecordingOptions(
    mask_input_options=MaskInputOptions(...)
)

Laminar.initialize(session_recording_options=options)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.