Testar um destino de telemetria
POST/v1/organizations/telemetry_destinations/{destination_id}/test
Envia um span de teste, chamado anthropic.test, ao destino com seus cabeçalhos registrados, uma única vez e sem novas tentativas, e relata a resposta do destino. A resposta é 200, quer o destino tenha respondido com um status 2xx ou não: seu result tem o tipo success, ou o tipo failure e o motivo em error. A configuração, o state e o delivery_health do destino não mudam. Um destino desabilitado também pode ser testado. Aguarde 10 segundos entre testes de um mesmo destino; uma solicitação que chegar antes disso pode ser respondida com o status 429.
Parameters
Returns
Testar um destino de telemetria
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaTelemetryDestinationTestResponse, err := client.Beta.Organization.TelemetryDestinations.Test(
context.TODO(),
"destination_id",
anthropic.BetaOrganizationTelemetryDestinationTestParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaTelemetryDestinationTestResponse.Result)
}Response 200
{
"result": {
"type": "success"
},
"type": "telemetry_destination_test"
}Returns Examples
Response 200
{
"result": {
"type": "success"
},
"type": "telemetry_destination_test"
}