Skip to navigation

Create Export Destination

Create a destination for the gateway’s request telemetry: Datadog, Grafana Cloud, or any OTLP/HTTP collector (generic, which needs an Enterprise plan). Each enabled destination gets all of the organization’s traffic, so a second one copies rather than splits it.

Authentication

AuthorizationBearer

A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.

Request

This endpoint expects an object.
credential_secretstringRequiredformat: "password"

The API key or token the destination authenticates with. Never returned; responses show credential_hint instead.

namestringRequired1-255 characters
A name for the destination, unique in the organization.
credential_usernamestring or nullOptional<=255 characters

grafana only: the Grafana Cloud instance ID. Not a secret, so it is returned.

enabledbooleanOptionalDefaults to true
Whether the gateway exports to the destination.
kind"otlp"OptionalDefaults to otlp
Can't be changed after creation.
metrics_enabledbooleanOptionalDefaults to false
Also export metrics. Datadog and Grafana Cloud bill these separately.
ml_appstring or nullOptional<=193 characters

Datadog only: the ml_app tag on exported spans.

otlp_endpointstring or nullOptional<=255 characters

generic only: the https URL of your OTLP collector.

otlp_presetenumOptionalDefaults to datadog

Where spans go: datadog (LLM Observability), grafana (Grafana Cloud Tempo) or generic, any OTLP/HTTP collector, which needs an Enterprise plan. Can’t be changed after creation.

Allowed values:
privacy_modebooleanOptionalDefaults to true
When true, prompts and completions are left out of exported spans.
sample_ratedoubleOptional0.0001-1Defaults to 1
Fraction of requests exported, from 0.0001 to 1.
sitestring or nullOptional

datadog: a Datadog site, like datadoghq.com. grafana: a Grafana Cloud zone, like prod-us-east-0. generic: not allowed; use otlp_endpoint.

Response

The created export destination
consecutive_failuresintegerRead-only
Failed deliveries in a row.
created_atdatetimeRead-only
When the destination was created.
credential_hintstring or nullRead-only

The last 4 characters of the stored secret, to tell secrets apart. null when the secret is under 12 characters (4 would give away too much of it).

credential_usernamestring or null

grafana only: the Grafana Cloud instance ID. Not a secret, so it is returned.

delivery_suspended_untildatetime or nullRead-only
Set while delivery is paused after repeated failures.
enabledboolean
Whether the gateway exports to the destination.
idstringRead-onlyformat: "uuid"
The destination's id.
kind"otlp"
Can't be changed after creation.
last_error_atdatetime or nullRead-only
When a delivery last failed.
last_error_messagestring or nullRead-only
Why the last failed delivery failed.
last_success_atdatetime or nullRead-only
When a delivery last succeeded.
metrics_enabledboolean
Also export metrics. Datadog and Grafana Cloud bill these separately.
ml_appstring or null

Datadog only: the ml_app tag on exported spans.

namestring
A name for the destination, unique in the organization.
organization_idstringRead-onlyformat: "uuid"
The organization the destination belongs to.
otlp_endpointstring or null

generic only: the https URL of your OTLP collector.

otlp_presetenum

Where spans go. Besides the presets create accepts, datadog-apm: those destinations are created in the dashboard only. Can’t be changed after creation.

Allowed values:
privacy_modeboolean
When true, prompts and completions are left out of exported spans.
sample_ratedouble
Fraction of requests exported, from 0.0001 to 1.
sitestring or null

datadog: a Datadog site, like datadoghq.com. grafana: a Grafana Cloud zone, like prod-us-east-0. generic: not allowed; use otlp_endpoint.

updated_atdatetimeRead-only
When the destination last changed.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error