---
title: "Create an OpenTelemetry exporter"
method: POST
path: "/orgs/{orgID}/projects/{projectID}/otel-exporters"
tags: ["Events"]
---

# Create an OpenTelemetry exporter

`POST /orgs/{orgID}/projects/{projectID}/otel-exporters`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/otel-exporters`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Exports future turns of every agent in the project as OpenTelemetry traces to an OTLP/HTTP endpoint. Spans follow the GenAI semantic conventions, and each finished turn is sent as one OTLP/HTTP request in protobuf or JSON encoding. A project can have up to 100 exporters, and only one exporter per endpoint.

## Path parameters

- `orgID` string, required
- `projectID` string, required: Project ID (proj_...).

## Request body

- CreateOtelExporterRequest
  - `endpoint` string, required: Full OTLP/HTTP traces URL, used exactly as given (for example a URL ending in /v1/traces).
  - `variant` 'otel' | 'langfuse' | 'braintrust' | 'langsmith': Which backend-specific attributes are added on top of the GenAI semantic conventions. otel adds none.
  - `encoding` 'protobuf' | 'json': OTLP/HTTP request body encoding. protobuf sends application/x-protobuf and is accepted by every OTLP/HTTP endpoint; json sends application/json and is available for the otel and langfuse variants only.
  - `auth_kind` 'none' | 'bearer_token' | 'api_key_header' | 'basic': How the exporter authenticates to the endpoint: none, Authorization Bearer token, a custom API key header named by auth_options.header_name, or HTTP Basic auth with auth_options.username and the secret password.
  - `auth_options` OtelExporterAuthOptions: Non-secret authentication settings. Must be empty for none and bearer_token. With api_key_header, set {"header_name":"..."}. With basic, set {"username":"..."} (for Langfuse, use the public key).
    - `header_name` string: Header that carries the API key when auth_kind is api_key_header.
    - `username` string: Non-secret username for HTTP Basic auth when auth_kind is basic (for Langfuse, the public key).
  - `credential_secret_id` string: Generic secret available to the project, required when auth_kind is bearer_token, api_key_header, or basic.
  - `headers` OtelExporterHeaders: Plain request headers sent with every export, by header name. Values are stored and returned as plain text, so Authorization is not accepted here; use auth_kind or secret_headers for credentials.
  - `secret_headers` OtelExporterSecretHeaders: Extra request headers whose values come from generic secrets available to the project, by header name. Prefer auth_kind and credential_secret_id for primary endpoint credentials.
  - `sample_percent` number, double: Percentage of turns exported. The decision is made once per turn, so a trace is exported whole or not at all.

## Response `201`

Exporter created.

- OtelExporter
  - `id` string, required
  - `org_id` string, required
  - `project_id` string, required: Project ID (proj_...).
  - `endpoint` string, required: Full OTLP/HTTP traces URL.
  - `variant` 'otel' | 'langfuse' | 'braintrust' | 'langsmith', required: Which backend-specific attributes are added on top of the GenAI semantic conventions. otel adds none.
  - `encoding` 'protobuf' | 'json', required: OTLP/HTTP request body encoding. protobuf sends application/x-protobuf and is accepted by every OTLP/HTTP endpoint; json sends application/json and is available for the otel and langfuse variants only.
  - `auth_kind` 'none' | 'bearer_token' | 'api_key_header' | 'basic', required: How the exporter authenticates to the endpoint: none, Authorization Bearer token, a custom API key header named by auth_options.header_name, or HTTP Basic auth with auth_options.username and the secret password.
  - `auth_options` OtelExporterAuthOptions, required: Non-secret authentication settings. Must be empty for none and bearer_token. With api_key_header, set {"header_name":"..."}. With basic, set {"username":"..."} (for Langfuse, use the public key).
    - `header_name` string: Header that carries the API key when auth_kind is api_key_header.
    - `username` string: Non-secret username for HTTP Basic auth when auth_kind is basic (for Langfuse, the public key).
  - `credential_secret_id` string: Generic secret available to the project, used for authentication. Omitted when auth_kind is none.
  - `headers` OtelExporterHeaders, required: Plain request headers sent with every export, by header name. Values are stored and returned as plain text, so Authorization is not accepted here; use auth_kind or secret_headers for credentials.
  - `secret_headers` OtelExporterSecretHeaders, required: Extra request headers whose values come from generic secrets available to the project, by header name. Prefer auth_kind and credential_secret_id for primary endpoint credentials.
  - `sample_percent` number, double, required: Percentage of turns exported. The decision is made once per turn, so a trace is exported whole or not at all.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-11-25** `6015d696b5cf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/otel-exporters/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
