Claude Platform Docs

Tujuan Telemetri

Buat Tujuan Telemetri
$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

Daftarkan tujuan OpenTelemetry untuk organisasi.

Daftar Tujuan Telemetri
$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

Daftar tujuan organisasi, yang terbaru lebih dulu, secara opsional hanya yang mencakup workspace tertentu.

Ambil Tujuan Telemetri
$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

Baca konfigurasi, status, dan hasil pengiriman terbaru suatu tujuan.

Perbarui Tujuan Telemetri
$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

Ubah pengaturan tujuan telemetri, statusnya, atau workspace mana yang dicakupnya.

Hapus Tujuan Telemetri
$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

Hapus tujuan beserta daftar workspace-nya.

Uji Tujuan Telemetri
$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

Kirim satu span uji, bernama anthropic.test, ke tujuan dengan header terdaftarnya, sekali dan tanpa percobaan ulang, lalu laporkan jawaban tujuan. Responsnya 200 baik tujuan menjawab dengan status 2xx maupun tidak: result-nya memiliki tipe success, atau tipe failure beserta alasannya di error. Konfigurasi, state, dan delivery_health tujuan tidak berubah. Tujuan yang dinonaktifkan juga dapat diuji. Tunggu 10 detik di antara pengujian satu tujuan; permintaan yang datang lebih cepat dapat dijawab dengan status 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:

Tujuan TelemetriWorkspace

Daftar Workspace Tujuan Telemetri
$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

Daftar workspace yang ada di daftar workspace suatu tujuan, dimulai dari entri terbaru.

Tambahkan Workspace Tujuan Telemetri
$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

Tambahkan satu workspace ke daftar workspace suatu tujuan.

Hapus Workspace Tujuan Telemetri
$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

Hapus satu workspace dari daftar workspace suatu tujuan.