Обновление назначения телеметрии
POST/v1/organizations/telemetry_destinations/{destination_id}
Изменить параметры назначения телеметрии, его состояние или охватываемые им рабочие пространства.
Отправьте хотя бы одно поле. Для пропущенных полей остаются сохранённые значения, за исключением зарегистрированных заголовков, которые удаляются при изменении имени хоста или порта конечной точки. Значение null принимают только display_name, traces, traces.endpoint_url, traces.content_mode, traces.max_content_bytes и отдельные значения headers.
Если другой запрос изменяет назначение во время выполнения обновления, 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"
}
}