HUB
Sign inSign up
telemetry-extended-collector logo

repodb/telemetry-extended-collector

By repodb

•Updated 16 days ago

A RESTful API that ingests extended telemetry data emitted by RepoDB and persists it to PGSQL.

Image
Developer tools
Monitoring & observability
0

84

repodb/telemetry-extended-collector repository overview

⁠RepoDB Extended Telemetry Collector API

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⁠.

⁠Running with Docker

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.

⁠Endpoints

RouteDescription
POST /v1/telemetry/extended/publishAccepts a batch of extended telemetry events.
POST /v1/telemetry/default/publishAccepts 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.

⁠Authentication

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.

⁠Configuration

The service is configured entirely via environment variables:

VariableRequiredDescription
API_KEYNoShared secret required by all endpoints via the X-API-Key header. Authentication is disabled when it is not set.
CONNECTION_STRINGYesPostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db).
MAX_BATCH_ITEMSNoMaximum number of events in a batch. Defaults to 10000.
MAX_DECOMPRESSED_BYTESNoMaximum size of a decompressed batch, in bytes. Defaults to 16777216.
LOG_LEVELNoLogging verbosity (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG.

See Extended telemetry⁠ for the full pipeline and the Docker Compose setup.

Tag summary

Content type

Image

Digest

sha256:c1be92245…

Size

54.9 MB

Last updated

16 days ago

docker pull repodb/telemetry-extended-collector