Claude Platform Docs

Destinos de telemetría

Crear un destino de telemetría
$client->beta->organization->telemetryDestinations->create(string endpointURL, TelemetryDestinationWorkspacesParams workspaces, ?string displayName, ?array<string,string> headers, ?TelemetryDestinationTracesParams traces, ?list<AnthropicBeta> betas): TelemetryDestination
POST/v1/organizations/telemetry_destinations
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Registra un destino de OpenTelemetry para la organización.

Listar destinos de telemetría
$client->beta->organization->telemetryDestinations->list(?int limit, ?string page, ?list<string> workspaceIDs, ?list<AnthropicBeta> betas): PageCursor<TelemetryDestination>
GET/v1/organizations/telemetry_destinations
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Lista los destinos de la organización, del más reciente al más antiguo, opcionalmente solo los que cubren determinados espacios de trabajo.

Recuperar un destino de telemetría
$client->beta->organization->telemetryDestinations->retrieve(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestination
GET/v1/organizations/telemetry_destinations/{destination_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Lee la configuración, el estado y los resultados de entrega más recientes de un destino.

Actualizar un destino de telemetría
$client->beta->organization->telemetryDestinations->update(string destinationID, ?string displayName, ?string endpointURL, ?array<string,string> headers, ?TelemetryDestinationStateParams state, ?TelemetryDestinationTracesParams traces, ?TelemetryDestinationWorkspacesParams workspaces, ?list<AnthropicBeta> betas): TelemetryDestination
POST/v1/organizations/telemetry_destinations/{destination_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Cambia la configuración de un destino de telemetría, su estado o los espacios de trabajo que cubre.

Eliminar un destino de telemetría
$client->beta->organization->telemetryDestinations->delete(string destinationID, ?list<AnthropicBeta> betas): DeletedTelemetryDestination
DELETE/v1/organizations/telemetry_destinations/{destination_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Elimina un destino y su lista de espacios de trabajo.

Probar un destino de telemetría
$client->beta->organization->telemetryDestinations->test(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestinationTestResponse
POST/v1/organizations/telemetry_destinations/{destination_id}/test
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Envía un span de prueba, llamado anthropic.test, al destino con sus encabezados registrados, una sola vez y sin reintentos, e informa la respuesta del destino. La respuesta es 200 tanto si el destino respondió con un estado 2xx como si no: su result tiene el tipo success, o el tipo failure y el motivo en error. La configuración, el state y el delivery_health del destino no cambian. También se puede probar un destino deshabilitado. Espera 10 segundos entre pruebas de un mismo destino; una solicitud que llegue antes puede recibir una respuesta con el estado 429.

Models
class DeletedTelemetryDestination { $type = 'telemetry_destination_deleted'; $id; }
"telemetry_destination_deleted" type
string id

ID of the deleted destination (tdst_...).

class TelemetryDestination { $type = 'telemetry_destination'; $id; $createdAt; /* 8 more */ }
One of the following:
"metadata_only"

The spans contain identifiers, timing, status, token counts, and similar metadata. They don't contain prompt text, completion text, or tool inputs and outputs.

"content"

The spans contain the same metadata as metadata_only, plus message and tool content.

An organization with a data-handling restriction, such as under HIPAA, can't choose this mode. The API exports only metadata for such an organization, even to a destination that already has content.

class TelemetryDestinationDeliveryHealth { $lastError; $lastErrorAt; $lastSuccessAt; }
?string lastError

A message that describes the most recent failed delivery to the destination, or null if no delivery has failed yet.

Examples are temporary DNS failure, TLS failure, timeout, connection failure, invalid address, HTTP error (status 503), and redirect (status 301). The message is invalid address both for a hostname that doesn't exist and for an address that isn't publicly routable. It never contains the endpoint's response body, a header value, a network address, or TLS details.

last_error and last_error_at always change together. A later successful delivery doesn't clear them. If last_success_at is later than last_error_at, a delivery has succeeded since this failure.

See the OpenTelemetry export guide to learn the likely cause of each error.

?\Datetime lastErrorAt

Time of the failure that last_error describes. Changes together with last_error. Null until a delivery first fails.

?\Datetime lastSuccessAt

Time of the most recent successful delivery to the destination, or null if no delivery has succeeded yet.

One of the following:
class TelemetryDestinationDisabledReasonCaller { $type = 'caller'; }
"caller" type
class TelemetryDestinationDisabledReasonInvalidAddress { $type = 'invalid_address'; }
"invalid_address" type
class TelemetryDestinationDisabledReasonRedirect { $type = 'redirect'; }
"redirect" type
class TelemetryDestinationDisabledReasonSustainedFailure { $type = 'sustained_failure'; }
"sustained_failure" type
One of the following:
class TelemetryDestinationStateEnabled { $type = 'enabled'; }
"enabled" type
class TelemetryDestinationStateDisabled { $type = 'disabled'; $reason; }
"disabled" type

Whether a caller or the API disabled the destination and, when the API did, why. Read-only.

class TelemetryDestinationStateDisabled { $type = 'disabled'; $reason; }
"disabled" type

Whether a caller or the API disabled the destination and, when the API did, why. Read-only.

class TelemetryDestinationStateDisabledParams { $type = 'disabled'; }
"disabled" type
class TelemetryDestinationStateEnabled { $type = 'enabled'; }
"enabled" type
class TelemetryDestinationStateEnabledParams { $type = 'enabled'; }
"enabled" type
One of the following:
class TelemetryDestinationStateEnabledParams { $type = 'enabled'; }
"enabled" type
class TelemetryDestinationStateDisabledParams { $type = 'disabled'; }
"disabled" type
class TelemetryDestinationTestFailure { $type = 'failure'; $error; }
"failure" type
string error

A message that describes why the test span was not delivered, including the HTTP status code when the destination returned one. Examples: HTTP error (status 403), timeout, TLS failure. It has the same form as the destination's delivery_health.last_error and never contains the destination's response body, any header value, a network address, or TLS details.

class TelemetryDestinationTestResponse { $type = 'telemetry_destination_test'; $result; }
"telemetry_destination_test" type

How the test went: success when the destination answered with a 2xx status, else failure with the reason.

One of the following:
class TelemetryDestinationTestSuccess { $type = 'success'; }
"success" type
class TelemetryDestinationTestFailure { $type = 'failure'; $error; }
"failure" type
string error

A message that describes why the test span was not delivered, including the HTTP status code when the destination returned one. Examples: HTTP error (status 403), timeout, TLS failure. It has the same form as the destination's delivery_health.last_error and never contains the destination's response body, any header value, a network address, or TLS details.

class TelemetryDestinationTestSuccess { $type = 'success'; }
"success" type
class TelemetryDestinationTraces { $contentMode; $enabled; $endpointURL; $maxContentBytes; }

What the exported spans contain.

bool enabled

Whether the destination receives traces. A destination whose enabled is false keeps its other settings.

?string endpointURL

The full URL that the API posts traces to, exactly as registered, or null if the destination doesn't have one.

When it is null, the API posts traces to endpoint_url with /v1/traces appended.

?int maxContentBytes

The most bytes of content that one exported span can contain, or null if only the API's maximum applies.

Content means model prompts and responses, and tool inputs and outputs. The API shortens longer content to this size before it delivers the span. A destination whose content_mode is metadata_only keeps this value. It applies once content_mode is content.

class TelemetryDestinationTracesParams { $contentMode; $enabled; $endpointURL; $maxContentBytes; }

What the exported spans contain. Defaults to metadata_only on create.

On update, null sets metadata_only.

?bool enabled

Whether the destination receives traces. Defaults to true on create. It cannot be null.

?string endpointURL

The full URL of your collector's traces endpoint, for a collector that takes traces on a path other than /v1/traces. The API posts traces to it exactly as given and appends nothing.

The same rules as for endpoint_url apply, except that any path is allowed. It must have the same scheme, host, and port as endpoint_url. At most 2,048 characters.

On create, null is the same as leaving it out. On update, null removes it. The API then posts traces to endpoint_url with /v1/traces appended. A change of this URL alone keeps the registered headers.

?int maxContentBytes

The most bytes of content that one exported span can contain, from 1 up to the API's maximum. null sets no bound, so only the API's maximum applies.

On create, leaving it out is the same as null. The error for a value above the maximum states the maximum.

One of the following:
class TelemetryDestinationWorkspacesAll { $type = 'all'; }
"all" type
class TelemetryDestinationWorkspacesInclude { $type = 'include'; }
"include" type
class TelemetryDestinationWorkspacesExclude { $type = 'exclude'; }
"exclude" type
class TelemetryDestinationWorkspacesAll { $type = 'all'; }
"all" type
class TelemetryDestinationWorkspacesAllParams { $type = 'all'; }
"all" type
class TelemetryDestinationWorkspacesExclude { $type = 'exclude'; }
"exclude" type
class TelemetryDestinationWorkspacesExcludeParams { $type = 'exclude'; $workspaceIDs; }
"exclude" type
?list<string> workspaceIDs

The IDs of the workspaces on the destination's list (wrkspc_...). At most 100 per request.

On create, these workspaces become the destination's list. If you leave workspace_ids out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

On update, workspace_ids replaces the whole list. A workspace that stays on the list keeps its entry and its created_at. An empty array empties the list. If you leave workspace_ids out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to include without workspace_ids, the destination doesn't cover any workspace until one is added. After a change to exclude without workspace_ids, it covers every workspace.

An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

class TelemetryDestinationWorkspacesInclude { $type = 'include'; }
"include" type
class TelemetryDestinationWorkspacesIncludeParams { $type = 'include'; $workspaceIDs; }
"include" type
?list<string> workspaceIDs

The IDs of the workspaces on the destination's list (wrkspc_...). At most 100 per request.

On create, these workspaces become the destination's list. If you leave workspace_ids out, the list starts empty. If the API refuses one of the IDs, it doesn't create the destination.

On update, workspace_ids replaces the whole list. A workspace that stays on the list keeps its entry and its created_at. An empty array empties the list. If you leave workspace_ids out and the type stays the same, the list doesn't change. If you leave it out and the type changes, the new list starts empty. After a change to include without workspace_ids, the destination doesn't cover any workspace until one is added. After a change to exclude without workspace_ids, it covers every workspace.

An ID sent more than once is added once. An archived workspace can't be added to a list. An update can keep an archived workspace that is already on the list.

One of the following:

Destinos de telemetríaEspacios de trabajo

Listar espacios de trabajo del destino de telemetría
$client->beta->organization->telemetryDestinations->workspaces->list(string destinationID, ?int limit, ?string page, ?list<AnthropicBeta> betas): PageCursor<BetaTelemetryDestinationWorkspace>
GET/v1/organizations/telemetry_destinations/{destination_id}/workspaces
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Lista los espacios de trabajo de la lista de espacios de trabajo de un destino, con la entrada más reciente primero.

Agregar un espacio de trabajo al destino de telemetría
$client->beta->organization->telemetryDestinations->workspaces->add(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaTelemetryDestinationWorkspace
POST/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Agrega un espacio de trabajo a la lista de espacios de trabajo de un destino.

Quitar un espacio de trabajo del destino de telemetría
$client->beta->organization->telemetryDestinations->workspaces->remove(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaDeletedTelemetryDestinationWorkspace
DELETE/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
Requires anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers

Quita un espacio de trabajo de la lista de espacios de trabajo de un destino.