Grafana
Grafana reads one Watchtower project through its built-in Prometheus, Loki and Tempo data sources. There is no Grafana plugin (the language rule keeps TypeScript to the web app and the browser SDK); the compatible read APIs below are the integration.
Credentials
Create a project API key with query:read (wtk_...). Grafana can send it either way:
Bearer: add the custom HTTP header
Authorization=Bearer wtk_....Basic auth: turn on Basic auth; the user is anything, the password is the
wtk_...key.
Inaccessible projects answer 404. Replace {prj} with the project id and HOST with your Watchtower API host.
Data sources
Type | URL | Notes |
|---|---|---|
Prometheus |
| Prometheus type, HTTP method GET. |
Loki |
| LogQL subset; unsupported constructs return 422 naming them. |
Tempo |
| Trace by id, search, tags, |
Tempo endpoints
All under /v1/projects/{prj}/tempo:
GET /api/traces/{id}and/api/v2/traces/{id}: OTLP JSON by default, OTLP protobuf withAccept: application/protobuf. A short id is left-padded with zeros. Unknown ids give 404. Spans carry no events; at most 10,000 spans are returned.GET /api/search?tags=k%3Dv&minDuration=&maxDuration=&start=&end=&limit=&q=:tagsis logfmt (service.name=api http.method="GET");service.name,nameandstatusmap to the span's own fields,resource.<key>to resource attributes, other keys to span attributes.qis TraceQL and cannot be combined withtagsor durations (422).startandendare Unix seconds (default last hour);limit1 to 200 (default 20). Results fromqdescribe the first matched span of each trace.GET /api/search/tags,GET /api/v2/search/tags,GET /api/search/tag/{name}/values,GET /api/v2/search/tag/{name}/values: names and values come from a sample of at most 100,000 spans in the last 24 h (500 names, 100 values at most).GET /api/echo: connection test, returnsecho.