更新遙測目的地
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
更新遙測目的地
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.telemetrydestinations.BetaTelemetryDestination;
import com.anthropic.models.beta.organization.telemetrydestinations.TelemetryDestinationUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
BetaTelemetryDestination betaTelemetryDestination = client.beta().organization().telemetryDestinations().update("destination_id");
}
}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"
}
}