遥测目标
创建遥测目标
$client->beta->organization->telemetryDestinations->create(string endpointURL, TelemetryDestinationWorkspacesParams workspaces, ?string displayName, ?array<string,string> headers, ?TelemetryDestinationTracesParams traces, ?list<AnthropicBeta> betas): TelemetryDestinationPOST/v1/organizations/telemetry_destinations
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers为组织注册一个 OpenTelemetry 目标。
列出遥测目标
$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列出组织的目标,最新的排在最前,可选择仅列出覆盖指定工作区的目标。
检索遥测目标
$client->beta->organization->telemetryDestinations->retrieve(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestinationGET/v1/organizations/telemetry_destinations/{destination_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers读取目标的配置、状态和最近的投递结果。
更新遥测目标
$client->beta->organization->telemetryDestinations->update(string destinationID, ?string displayName, ?string endpointURL, ?array<string,string> headers, ?TelemetryDestinationStateParams state, ?TelemetryDestinationTracesParams traces, ?TelemetryDestinationWorkspacesParams workspaces, ?list<AnthropicBeta> betas): TelemetryDestinationPOST/v1/organizations/telemetry_destinations/{destination_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers更改遥测目标的设置、状态或其覆盖的工作区。
删除遥测目标
$client->beta->organization->telemetryDestinations->delete(string destinationID, ?list<AnthropicBeta> betas): DeletedTelemetryDestinationDELETE/v1/organizations/telemetry_destinations/{destination_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers删除目标及其工作区列表。
测试遥测目标
$client->beta->organization->telemetryDestinations->test(string destinationID, ?list<AnthropicBeta> betas): TelemetryDestinationTestResponsePOST/v1/organizations/telemetry_destinations/{destination_id}/test
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers使用目标已注册的标头向其发送一个名为 anthropic.test 的测试 span,仅发送一次且不重试,并报告目标的响应。无论目标是否以 2xx 状态响应,响应均为 200:其 result 的类型为 success,或类型为 failure 并在 error 中给出原因。目标的配置、state 和 delivery_health 不会改变。已禁用的目标也可以测试。对同一目标的两次测试之间请等待 10 秒;过早发出的请求可能会收到 429 状态。
Models
遥测目标工作区
列出遥测目标工作区
$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列出目标工作区列表中的工作区,最新条目排在最前。
添加遥测目标工作区
$client->beta->organization->telemetryDestinations->workspaces->add(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaTelemetryDestinationWorkspacePOST/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers向目标的工作区列表中添加一个工作区。
移除遥测目标工作区
$client->beta->organization->telemetryDestinations->workspaces->remove(string workspaceID, string destinationID, ?list<AnthropicBeta> betas): BetaDeletedTelemetryDestinationWorkspaceDELETE/v1/organizations/telemetry_destinations/{destination_id}/workspaces/{workspace_id}
Requires
anthropic-beta: telemetry-destinations-2026-08-11. How to send beta headers从目标的工作区列表中移除一个工作区。