Crea una destinazione di telemetria
POST/v1/organizations/telemetry_destinations
Registra una destinazione OpenTelemetry per l'organizzazione.
La destinazione parte nello stato enabled. Un'organizzazione può avere al massimo 10 destinazioni, incluse quelle disabilitate.
Consulta la guida all'esportazione OpenTelemetry per saperne di più sull'aggiunta di una destinazione.
Parameters
Returns
Crea una destinazione di telemetria
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.BetaTelemetryDestinationWorkspacesAllParams;
import com.anthropic.models.beta.organization.telemetrydestinations.TelemetryDestinationCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
TelemetryDestinationCreateParams params = TelemetryDestinationCreateParams.builder()
.endpointUrl("x")
.workspaces(BetaTelemetryDestinationWorkspacesAllParams.builder().build())
.build();
BetaTelemetryDestination betaTelemetryDestination = client.beta().organization().telemetryDestinations().create(params);
}
}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"
}
}