Skip to content

Observability

A project's errors, grouped: the same exception (its name, its message with numbers and ids taken out, and the top frame of its stack) is one group, with its count, first and last time seen, the deployment it was first seen on (what likely brought it in), its last request and trace, its state (open, resolved or ignored) and the issue made for it.

GET/workspaces/{workspace}/projects/{project}/observability/errors

Most recently seen first, at most 200. Filter by state, environment and service, between from and to. Needs a role on the project’s repository.

The same exception is one group: its name, its message with numbers and ids taken out, and the top frame of its stack. first_deployment_id is the deployment it was first seen on, what likely brought it in. At most 200 groups, most recently seen first.

Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
project string Yes The project’s slug, as in g1t.sh/{workspace}/{project}.
Name Type Required Description
state string No Only groups in this state. One of open, resolved, ignored.
environment string No Only what ran in this environment, such as production or preview; several comma-separated.
service string No Only what this service sent (OpenTelemetry’s service.name; an app on g1t.page is its project’s name); several comma-separated.
from string No The start of the period: an RFC 3339 time or Unix milliseconds. 24 hours before to unless you say.
to string No The end of the period: an RFC 3339 time or Unix milliseconds. Now unless you say.
curl "https://api.g1t.sh/workspaces/flagon-io/projects/g1t/observability/errors?state=open" \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

[
{
"fingerprint": "9f2c41d07ab3e815",
"name": "TypeError",
"message": "Cannot read properties of undefined (reading 'head')",
"stack": "TypeError: Cannot read properties of undefined (reading 'head')\n at loadPull (app/routes/pulls.ts:88:31)",
"service": "g1t-web",
"environment": "production",
"first_us": 1791813062000000,
"last_us": 1791813808000000,
"count": 37,
"first_deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
"last_request_id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
"last_trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"state": "open",
"issue_number": null
}
]

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.