Créer une destination de télémétrie
POST/v1/organizations/telemetry_destinations
Enregistrer une destination OpenTelemetry pour l'organisation.
La destination démarre à l'état enabled. Une organisation peut avoir au maximum 10 destinations, y compris celles qui sont désactivées.
Consultez le guide d'export OpenTelemetry pour en savoir plus sur l'ajout d'une destination.
Parameters
Returns
Créer une destination de télémétrie
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"
}
}