A RESTful API that ingests extended telemetry data emitted by RepoDB and persists it to PGSQL.
84
A RESTful API that ingests the extended telemetry emitted by RepoDB libraries (command, connection, error, parameter, result, row count, resource usage and tracing details) and persists it to RepoDB PGSQL.
Create the network (skip if it already exists):
docker network create repodb
Build the image:
docker build . -t repodb/telemetry-extended-collector:latest
Run the image:
docker run -d --name repodb-telemetry-extended-collector \
-p 5002:5002 \
-e API_KEY=RepoDB2026 \
-e CONNECTION_STRING="postgresql://postgres:RepoDB2026@repodb-insights-postgres:5432/repodb_insights" \
--network=repodb \
repodb/telemetry-extended-collector:latest
The API listens on port 5002. Interactive API docs are available at /docs (Swagger UI) and /redoc (ReDoc). The database needs the ExtendedTelemetry table, which comes with repodb/insights-postgres 0.0.2 or later.
| Route | Description |
|---|---|
POST /v1/telemetry/extended/publish | Accepts a batch of extended telemetry events. |
POST /v1/telemetry/default/publish | Accepts the Default payload as well, so a Default publisher can target this API. Both routes write to ExtendedTelemetry. |
The body is sent as Content-Type: text/plain: the Base64 of a gzip-compressed UTF-8 JSON array of events. A batch is validated as a whole, so a malformed batch returns 422 and nothing is written. A batch above the limits returns 413.
Every endpoint (except /docs, /redoc, and /openapi.json) requires an X-API-Key header matching the API_KEY environment variable. Requests with a missing or invalid key receive 401 Unauthorized. If API_KEY is not set, authentication is disabled.
The service is configured entirely via environment variables:
| Variable | Required | Description |
|---|---|---|
API_KEY | No | Shared secret required by all endpoints via the X-API-Key header. Authentication is disabled when it is not set. |
CONNECTION_STRING | Yes | PostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db). |
MAX_BATCH_ITEMS | No | Maximum number of events in a batch. Defaults to 10000. |
MAX_DECOMPRESSED_BYTES | No | Maximum size of a decompressed batch, in bytes. Defaults to 16777216. |
LOG_LEVEL | No | Logging verbosity (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG. |
See Extended telemetry for the full pipeline and the Docker Compose setup.
Content type
Image
Digest
sha256:c1be92245…
Size
54.9 MB
Last updated
16 days ago
docker pull repodb/telemetry-extended-collector