Sign inSign up

repodb/telemetry-default-query

By repodb

Updated 2 months ago

A RESTful API that queries telemetry data from PGSQL (operational) and in disk (historical).

Image
API management
Developer tools
Monitoring & observability
0

294

repodb/telemetry-default-query repository overview

RepoDB Telemetry Query API

A RESTful API that queries telemetry data emitted by RepoDB libraries, from both operational (RepoDB PGSQL) and historical (flat-file storage generated by RepoDB File Data Sinker service).

Running with Docker

Create the volume and network (skip if they already exist):

docker volume create repodb_telemetry_data
docker network create repodb

Run the image:

docker run -d --name repodb-telemetry-default-query \
  -p 5001:5001 \
  -e API_KEY=RepoDB2026 \
  -e CONNECTION_STRING="postgresql://postgres:RepoDB2026@repodb-insights-postgres:5432/repodb_insights" \
  -e DIRECTORY_PATH=/data/default/telemetry \
  -v repodb_telemetry_data:/data/default/telemetry \
  --network=repodb \
  repodb/telemetry-default-query:latest

The API is only listening on port 5001.

Authentication

Every endpoint (except /docs, /redoc, and /openapi.json) requires the shared API key, matching the API_KEY environment variable. It can be supplied via X-API-Key header.

Serivces such as FileDataSinker and Visualization, and client libraries are passing this header to authenticate against this API.

Configuration

The service is configured entirely via environment variables:

VariableRequiredDescription
API_KEYNoShared secret required by all endpoints, via either the X-API-Key header or the api_key query parameter.
CONNECTION_STRINGYesPostgreSQL connection string used for operational queries (e.g. postgresql://user:pass@host:5432/db).
DIRECTORY_PATHNoRoot directory containing historical telemetry files. Defaults to /tmp/repodb/telemetry.
ALLOWED_ORIGINSNoComma-separated list of origins allowed to call the API from a browser (CORS). Defaults to http://localhost:3000. Must match the calling origin exactly, with no trailing slash.
ALLOWED_METHODSNoComma-separated list of HTTP methods allowed by CORS. Defaults to GET.
ALLOWED_HEADERSNoComma-separated list of request headers allowed by CORS, or * to allow any header. Defaults to *. Use * if the calling tool (e.g. Grafana) may attach headers you don't control.

Tag summary

Content type

Image

Digest

sha256:2aa8df5b4

Size

143.6 MB

Last updated

2 months ago

docker pull repodb/telemetry-default-query