A service that periodically reads extended telemetry data from PGSQL and archives them to disk.
84
A long-running worker that periodically reads telemetry rows that are not yet archived out of RepoDB PGSQL (ExtendedTelemetry table) and archives them to Parquet files on disk (or a mounted volume). The Query API reads these files for its historical routes.
Create the volume (to persist the archived files across container restarts) and network (skip either if it already exists):
docker volume create repodb_telemetry_extended_data
docker network create repodb
Build the image:
docker build . -t repodb/telemetry-extended-filedatasinker:latest
Run the image:
docker run -d --name repodb-telemetry-extended-filedatasinker --cpus=0.25 \
-e CONNECTION_STRING="postgresql://postgres:RepoDB2026@repodb-insights-postgres:5432/repodb_insights" \
-e DIRECTORY_PATH="/data/telemetry/extended" \
-e FREQUENCY_IN_MINUTES=60 \
-v repodb_telemetry_extended_data:/data/telemetry/extended \
--network=repodb \
repodb/telemetry-extended-filedatasinker:latest
A volume mount for DIRECTORY_PATH is recommended so the archive persists. Run only one sinker per volume, because file merging does not coordinate between several writers.
The service runs an immediate cycle on startup, then repeats, sleeping FREQUENCY_IN_MINUTES between cycles:
ARCHIVE_BATCH_SIZE rows where ArchivedAt is empty, ordered by Id, so late-arriving events are picked up too.StartTime, merged by Id into that day's Parquet file, and each file is replaced atomically. Each event is stored as its full JSON, so every field, including the resource usage, is kept.ArchivedAt. A failed write leaves them unmarked, and a failed acknowledgement is retried without duplicating archived rows.Failures are caught and logged, and the service tries again on the next cycle. The Purger removes only rows that have been archived.
The service is configured entirely via environment variables:
| Variable | Required | Description |
|---|---|---|
CONNECTION_STRING | Yes | PostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db). The service fails to start if it is missing. |
DIRECTORY_PATH | No | Root directory the archive files are written under. Defaults to /tmp/repodb/telemetry/extended. |
FREQUENCY_IN_MINUTES | No | Minutes between cycles. Defaults to 60. |
ARCHIVE_BATCH_SIZE | No | Maximum number of rows archived per cycle. Defaults to 10000. |
LOG_LEVEL | No | Logging verbosity (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG. |
Content type
Image
Digest
sha256:cc4746cc4…
Size
146.1 MB
Last updated
16 days ago
docker pull repodb/telemetry-extended-filedatasinker