What Is OTLP Ingestion?
OpenTelemetry Protocol (OTLP) is a vendor-neutral, industry-standard telemetry format for transmitting trace data. Maxim provides OTLP ingestion capabilities for both AI and LLM Observability, enabling deep insights into your AI systems.Overview
OpenTelemetry Protocol (OTLP) is a vendor-neutral, industry-standard telemetry format for transmitting trace data. Maxim provides OTLP ingestion capabilities for both AI and LLM Observability, enabling deep insights into your AI systems.Before you begin
- A Maxim account and Log Repository
- Your Log Repository ID (for the
x-maxim-repo-idheader) - Your Maxim API Key (for the
x-maxim-api-keyheader) - Learn how to obtain API keys - Familiarity with OpenTelemetry Semantic Conventions. Currently we support the following semantic conventions:
- Generative AI: Generative AI Semantic Conventions
- OpenInference: OpenInference Semantic Conventions
- AI SDK: AI SDK Semantic Conventions
Ensure you have created a Log Repository in Maxim and have your Log Repository ID ready. You can find it in the Maxim Dashboard under Logs > Repositories.
Endpoint & Protocol Configuration
Endpoint:https://api.getmaxim.ai/v1/otel
Supported Protocols: HTTP with OTLP binary Protobuf or JSON
| Protocol | Content-Type |
|---|---|
| HTTP + Protobuf (binary) | application/x-protobuf or application/protobuf |
| HTTP + JSON | application/json |
- HTTPS/TLS is required.
Authentication Headers
Maxim’s OTLP endpoint requires the following headers:x-maxim-repo-id: Your Maxim Log Repository IDx-maxim-api-key: Your Maxim API KeyContent-Type:application/json,application/x-protobuf, orapplication/protobuf
Supported Trace Format
Maxim currently supports traces that follow the OpenTelemetry Semantic Conventions for Generative AI (specification).Best Practices
- Use binary Protobuf (
application/x-protobuf) for optimal performance and robustness - Batch traces to reduce network overhead
- Include rich attributes following GenAI semantic conventions
- Secure your headers and avoid exposing credentials
- Monitor attribute size limits and apply appropriate quotas
Error Codes and Responses
| HTTP Status | Condition | Description |
|---|---|---|
| 200 | Success | { "data": { "success": true } } |
| 403 | Missing or invalid headers - x-maxim-repo-id or x-maxim-api-key | { "code": 403, "message": "Invalid access error" } |
Code Examples
Python Example
Maxim-specific additional attributes
Maxim supports the following additional attributes to enrich your traces:maxim-trace-tags: AMap<string, string>of tags that will be attached to the parent trace of the span (if the current node is a trace itself, this will be attached to the same trace).maxim-tags: AMap<string, string>of tags that will be attached to the current node.maxim-trace-metrics: AMap<string, number>of metrics that will be attached to the parent trace of the span (if the current node is a trace itself, this will be attached to the same trace).maxim-metrics: AMap<string, number>of metrics that will be attached to the current node.
For OpenInference, the above tags should be present in the
metadata field of the OpenInference log line. Example shown below: