A long-running worker that periodically reads telemetry data from PGSQL and archives them to disk.
304
A long-running worker that periodically reads telemetry rows out of RepoDB PGSQL (DefaultTelemetry table) and archives them to Parquet files on disk (or a mounted volume), picking up exactly where the previous cycle left off.
Create the volume (to persist the status file and archived Parquet files across container restarts) and network (skip either if it already exists):
docker volume create repodb_telemetry_data
docker network create repodb
Run the image:
docker run -d --name repodb-telemetry-default-filedatasinker --cpus=0.25 \
-e CONNECTION_STRING="postgresql://postgres:RepoDB2026@repodb-insights-postgres:5432/repodb_insights" \
-e DIRECTORY_PATH="/data/telemetry/default" \
-e FREQUENCY_IN_MINUTES=60 \
-v repodb_telemetry_data:/data/telemetry/default \
--network=repodb \
repodb/telemetry-default-filedatasinker:latest
A volume mount for DIRECTORY_PATH (as shown above) is recommended so the status file and archived Parquet files persist across container restarts.
The service runs an immediate sink cycle on startup, then loops forever, sleeping between cycles:
StartTime currently in the Telemetry table (or the current time if the table is empty).(start, end) chunk, rows where "StartTime" >= start AND "StartTime" < end are fetched and, if any exist, merged into that day's Parquet file.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). Read directly from the environment with no default, so the service fails to start if it's missing. |
DIRECTORY_PATH | No | Root directory the status file and archived data are written under. Defaults to /tmp/repodb/telemetry. Backslashes are normalized to forward slashes. |
FREQUENCY_IN_MINUTES | No | Minutes between sink cycles. Defaults to 60. Also used to align each cycle's wake-up time to a fixed grid (see "Cycle Timing" below). |
MAX_META_HISTORY | No | Maximum number of run entries retained in the status file's history log. Defaults to 20000. |
LOG_LEVEL | No | The logging level (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG. |
The source table and timestamp column are fixed in code as the query used by the code (DefaultTelemetry table, filtered on StartTime field), matching the convention used by the Purger service. They are not configurable via environment variables.
Content type
Image
Digest
sha256:81868846b…
Size
138.5 MB
Last updated
3 months ago
docker pull repodb/telemetry-default-filedatasinker