Endpoints behind the dashboard’s System > Telemetry page. Telemetry is off unless an operator turns it on; Telemetry explains what a report contains. All need settings:manage.
On an instance a hosting platform manages, telemetry is set by the platform: PUT answers 409, as does writing or deleting a telemetry.* key through the settings endpoints.
Get telemetry settings
Section titled “Get telemetry settings”GET /admin/settings/telemetryResponse: 200 OK
{ "mode": "off", "contact": null, "lexicon_names": false, "lexicon_structure": false, "lexicon_documents": false, "instance_id": null, "collector_url": "https://telemetry.happyview.dev/v1/snapshot", "prompted": true, "managed": false}| Field | Description |
|---|---|
mode | off sends nothing; manual sends a report only when an operator asks; auto sends one a day |
contact | An optional way to reach the operator, sent with each report |
lexicon_ | Whether reports include the NSIDs of the instance’s collections |
lexicon_ | Whether reports include the structure of the instance’s lexicons |
lexicon_ | Whether reports include the lexicon documents themselves, up to a size budget |
instance_ | A random id, created the first time reporting is turned on |
collector_ | Where reports go; TELEMETRY_COLLECTOR_URL |
prompted | Whether an operator has answered the dashboard’s telemetry question |
managed | Whether a hosting platform manages telemetry |
Change telemetry settings
Section titled “Change telemetry settings”PUT /admin/settings/telemetryEvery field is optional; one you leave out is unchanged. Saving also counts as answering the dashboard’s question.
{ "mode": "manual", "contact": "ops@example.com", "lexicon_names": true }Response: 200 OK, the same shape as Get telemetry settings.
Errors: 400 for an unknown mode or a contact longer than 512 characters; 409 when a platform manages telemetry.
Dismiss the telemetry question
Section titled “Dismiss the telemetry question”POST /admin/settings/telemetry/dismissMarks the dashboard’s question as answered without changing anything.
Response: 200 OK, the same shape as Get telemetry settings.
Preview a report
Section titled “Preview a report”GET /admin/settings/telemetry/previewReturns the report the instance would send now, without sending it.
Send a report
Section titled “Send a report”POST /admin/settings/telemetry/sendSends a report now.
Response: 200 OK { "sent": true, "benchmarks": … }, where benchmarks is what the collector answered, or null.
Errors: 400 when mode is off; 500 when the report couldn’t be sent.
© HappyProto

