OpenTelemetry
Altix ErrorTrack utilise le protocole Sentry : vous pouvez donc vous servir du SDK officiel OTLP/HTTP exporter. Les extraits ci-dessous utilisent un DSN d'exemple ; la page de configuration de votre projet les affiche avec votre véritable DSN.
Installer le SDK
Ajoutez
OTLP/HTTP exporter, le SDK Sentry officiel. Il fonctionne sans aucune modification avec Altix ErrorTrack.bash
# Any OpenTelemetry SDK with the OTLP/HTTP exporter, http/protobuf (the # default) or http/json. Counters must use delta temporality. export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=deltaLe configurer
Initialisez le SDK le plus tôt possible dans votre application, à l'aide de votre DSN.
bash
# Your DSN: https://<public-key>@errortrack.altixcode.com/<project-id> export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://errortrack.altixcode.com/api/%3Cproject-id%3E/otlp/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://errortrack.altixcode.com/api/%3Cproject-id%3E/otlp/v1/logs export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://errortrack.altixcode.com/api/%3Cproject-id%3E/otlp/v1/metrics export OTEL_EXPORTER_OTLP_HEADERS="x-sentry-auth=sentry sentry_key=%3Cpublic-key%3E"Vérifier
Déclenchez volontairement une erreur. Elle apparaîtra dans votre flux de problèmes en quelques secondes.
text
Start your service and send one request: its trace appears under Traces.
Créez un projet et sa page de configuration préremplira votre véritable DSN.