Metrics and telemetry ›
Test telemetry
POST
/v1/telemetry/testSend the collector one empty export.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const test = await agental.testTelemetry();
Answer200 OK · TelemetryTest
- {
- "ok": boolean,
- "status": integer | null,
- "message": string | null,
- }
One empty metrics export was sent to the collector, with its headers, and this is what it answered.
Headers
AuthorizationrequiredBearer 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
okboolean
True when the collector took the export.
statusintegernull
What the collector answered, or null where it did not answer or nothing was sent.
messagestringnull
What went wrong, or what the collector said it did not take.
Errors and other answers
| 403 | role_required in a team, only an owner or an admin changes or tries its collector. |
| 404 | not_found no collector is set. |
| 501 | telemetry_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.