Docs
Metrics and telemetry ›

Test telemetry

POST/v1/telemetry/test

Send the collector one empty export.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const test = await agental.testTelemetry();
Answer200 OK · TelemetryTest
  1. {
  2. "ok": boolean,
  3. "status": integer | null,
  4. "message": string | null,
  5. }

One empty metrics export was sent to the collector, with its headers, and this is what it answered.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 One empty metrics export was sent to the collector, with its headers, and this is what it answered. ok is false when it refused, did not answer in 10 seconds, or is at an address that is not sent to. Nothing else is changed: lastExportAt and lastError are about the exports themselves.

TelemetryTest3 fields
ok
boolean
True when the collector took the export.
status
integernull
What the collector answered, or null where it did not answer or nothing was sent.
message
stringnull
What went wrong, or what the collector said it did not take.

Errors and other answers

403role_required in a team, only an owner or an admin changes or tries its collector.
404not_found no collector is set.
501telemetry_unavailable nothing is sent to a collector here. GET /v1/policy says so as telemetry.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.