Skip to content

Observability

The requests (and other invocations) a project's software answered, newest first: each with its method, url, route (ids taken out), status, outcome, duration_us, cpu_ms, region, trace_id, log_count, error, and where it came from (service, environment, deployment_id, commit_sha, source).

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

Apps on g1t.page send them with nothing to set up; software elsewhere, as OpenTelemetry server spans. Filter by words in q, status (2xx, 3xx, 4xx, 5xx or a status, comma-separated), errors_only (a 5xx or an outcome other than ok), route, min_duration_ms, environment, service and deployment_id, between from and to. A page holds limit; pass next back as cursor for the next. Needs a role on the project’s repository.

Apps on g1t.page send their requests with nothing to set up; software hosted elsewhere sends them as OpenTelemetry server spans. route is the path with ids taken out, which the overview groups by. Pass next back as cursor for the next page; it is null on the last.

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
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.
q string No Words to find, all of them, or a phrase in quotes.
status string No Only these statuses: 2xx, 3xx, 4xx, 5xx or a status such as 404, comma-separated.
errors_only boolean No Only those that failed: a 5xx, or an outcome other than ok.
route string No Only this route, as the list shows it, such as /users/:id.
min_duration_ms integer No Only those that took at least this many milliseconds.
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.
deployment_id string No Only this deployment’s (dpl_…).
cursor string No Where to carry on from: the last page’s next.
limit integer No How many a page holds.
curl "https://api.g1t.sh/workspaces/flagon-io/projects/g1t/observability/requests?errors_only=true&limit=1" \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

{
"items": [
{
"id": "req_01kq9b7d9f1h3k5m7p9r1t3v5x",
"time_us": 1791813807418000,
"duration_us": 842000,
"trigger": "fetch",
"method": "GET",
"url": "g1t.sh/flagon-io/g1t/pulls/412",
"route": "/:workspace/:repo/pulls/:number",
"status": 500,
"outcome": "exception",
"cpu_ms": 31.4,
"region": "IAD",
"country": "US",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"log_count": 2,
"error": {
"name": "TypeError",
"message": "Cannot read properties of undefined (reading 'head')"
},
"service": "g1t-web",
"environment": "production",
"deployment_id": "dpl_01kq9a2c4e6g8j0m2p4r6t8v0x",
"commit_sha": "7c1e9a4b2d6f80135ac9e2b7d4f6a8c0e1b3d5f7",
"source": "cloudflare"
}
],
"next": "eyJ0IjoxNzkxODEzODA3NDE4MDAwfQ"
}

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.