更新遥测目标
POST/v1/organizations/telemetry_destinations/{destination_id}
更改遥测目标的设置、状态或其覆盖的工作区。
请至少发送一个字段。省略的字段保留其已存储的值,但已注册的标头除外:更改端点的主机名或端口会移除这些标头。只有 display_name、traces、traces.endpoint_url、traces.content_mode、traces.max_content_bytes 以及单个 headers 值接受 null。
如果在更新运行期间有其他请求更改了该目标,API 会返回 409 conflict_error。请重新读取目标,然后重试更新。
请参阅 OpenTelemetry 导出指南,详细了解如何更改目标。
Parameters
Returns
更新遥测目标
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
beta_telemetry_destination = anthropic.beta.organization.telemetry_destinations.update("destination_id")
puts(beta_telemetry_destination)Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"delivery_health": {
"last_error": "last_error",
"last_error_at": "2019-12-27T18:11:19.117Z",
"last_success_at": "2019-12-27T18:11:19.117Z"
},
"display_name": "display_name",
"endpoint_url": "endpoint_url",
"header_names": [
"string"
],
"state": {
"type": "enabled"
},
"traces": {
"content_mode": "metadata_only",
"enabled": true,
"endpoint_url": "endpoint_url",
"max_content_bytes": 0
},
"type": "telemetry_destination",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspaces": {
"type": "all"
}
}Returns Examples
Response 200
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"delivery_health": {
"last_error": "last_error",
"last_error_at": "2019-12-27T18:11:19.117Z",
"last_success_at": "2019-12-27T18:11:19.117Z"
},
"display_name": "display_name",
"endpoint_url": "endpoint_url",
"header_names": [
"string"
],
"state": {
"type": "enabled"
},
"traces": {
"content_mode": "metadata_only",
"enabled": true,
"endpoint_url": "endpoint_url",
"max_content_bytes": 0
},
"type": "telemetry_destination",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspaces": {
"type": "all"
}
}