Portkey supports sending your Analytics data to OpenTelemetry (OTel) compatible collectors, allowing you to integrate Portkey’s analytics with your existing observability infrastructure.
Overview
While Portkey leverages Clickhouse as the primary Analytics Store for the Control Panel by default, enterprise customers can integrate Portkey’s analytics data with their existing data infrastructure through OpenTelemetry.
This export focuses on aggregated metrics and analytics data such as:
- Request counts and latency metrics
- Token usage statistics
- Cost tracking data
- Error rates and status codes
For exporting complete request/response logs with full prompt and completion content, see Complete Logs Export.
Configuration
Portkey supports pushing your analytics data to an OTel compatible endpoint. The following environment variables are needed for pushing to OTel:
OTEL_PUSH_ENABLED: true
OTEL_ENDPOINT: http://localhost:4318
OTEL_EXPORTER_OTLP_HEADERS: x-api-key=my-api-key,x-another-header=value
Environment Variables
| Variable | Required | Description |
|---|
OTEL_PUSH_ENABLED | Yes | Set to true to enable analytics export |
OTEL_ENDPOINT | Yes | The OTLP endpoint URL |
OTEL_EXPORTER_OTLP_HEADERS | No | Comma-separated headers in key=value format |
Resource Attributes
You can configure arbitrary resource attributes of the OTel logs by setting a comma-separated value for OTEL_RESOURCE_ATTRIBUTES:
OTEL_SERVICE_NAME: portkey-gateway
OTEL_RESOURCE_ATTRIBUTES: ApplicationShortName=gateway,AssetId=12323,deployment.service=production
| Variable | Description |
|---|
OTEL_SERVICE_NAME | Service name for the telemetry data |
OTEL_RESOURCE_ATTRIBUTES | Comma-separated key=value pairs for additional resource attributes |
Integration Options
Enterprise customers commonly use these analytics exports with:
- Datadog: Monitor and analyze your AI operations alongside other application metrics
- AWS S3: Store analytics data for long-term retention and analysis
- Prometheus/Grafana: Build custom dashboards and alerting
- Splunk: Integrate with existing SIEM infrastructure
- Other OTel-compatible systems: Any system that can ingest OpenTelemetry data
Use Cases
This feature enables:
- Centralized observability across your entire tech stack
- Long-term storage of analytics data
- Custom analytics dashboards in your preferred tools
- Integration with existing alerting systems
- Compliance and audit trail requirements
Getting Support
For additional assistance with setting up analytics data export:
Our team can help you with best practices for configuring your OTel collectors and integrating with your existing systems. Last modified on January 28, 2026