# OpenTelemetry

The InteractiveAI SDK includes built-in telemetry capabilities. Direct OTLP endpoint configuration, documented below, serves environments without SDK coverage or teams operating existing collector infrastructure.

InteractiveAI ingests trace data through a standards-compliant OTLP receiver at `/api/public/otel`. This enables compatibility with any instrumentation library adhering to OpenTelemetry specifications extending language support beyond the InteractiveAI SDK to Java, Go, Rust, and other ecosystems.

***

### Endpoint Configuration

Configure your OpenTelemetry exporter with the appropriate endpoints:

```python
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://app.interactive.ai/api/public/otel
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://app.interactive.ai/api/public/otel/v1/traces
```

For collectors requiring signal-specific paths, append `/v1/traces` to the base endpoint:

```bash
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic <YOUR_BASE64_AUTH_STRING>"
```

***

### Authentication

InteractiveAI authenticates OTLP requests via Basic Auth. Encode your API credentials as a base64 string:

```bash
echo -n "pk-YOUR_PUBLIC_KEY:sk-YOUR_SECRET_KEY" | base64
```

Pass the encoded string in the authorization header:

```bash
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic YOUR_BASE64_STRING"
```

{% hint style="warning" %}
On GNU/Linux systems processing longer API keys, append `-w 0` to prevent automatic line wrapping in the base64 output.
{% endhint %}

***

### Protocol Requirements

InteractiveAI supports HTTP/protobuf transport exclusively. gRPC connections are not accepted.

***

### Compatible Instrumentation Libraries

Standard OpenTelemetry GenAI instrumentation libraries route traces to InteractiveAI without modification. Commonly deployed options include:

| Library     | Language Coverage  | Notable Framework Support     |
| ----------- | ------------------ | ----------------------------- |
| OpenLLMetry | Python, Java, Go   | LangChain, LlamaIndex, CrewAI |
| OpenLIT     | Python, Java, Go   | AutoGen, Claude Agent SDK     |
| Arize       | Python, JavaScript | LangGraph                     |

Each library instruments model calls, vector database operations, and framework-specific workflows automatically.

***

### Attribute Mapping

InteractiveAI converts incoming OpenTelemetry spans into its internal trace structure and automatically interprets standard GenAI semantic conventions. Additional attributes are preserved as metadata and are available for filtering and debugging
