HUB
Sign inSign up
telemetry-extended-filedatasinker logo

repodb/telemetry-extended-filedatasinker

By repodb

•Updated 16 days ago

A service that periodically reads extended telemetry data from PGSQL and archives them to disk.

Image
Integration & delivery
Developer tools
Monitoring & observability
0

84

repodb/telemetry-extended-filedatasinker repository overview

⁠RepoDB Extended Telemetry File Data Sinker Service

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.

⁠Running with Docker

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.

⁠How It Works

The service runs an immediate cycle on startup, then repeats, sleeping FREQUENCY_IN_MINUTES between cycles:

  1. Select a batch. It reads up to ARCHIVE_BATCH_SIZE rows where ArchivedAt is empty, ordered by Id, so late-arriving events are picked up too.
  2. Write the files. Rows are grouped by the UTC date of their 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.
  3. Acknowledge. Only after every file is written are the rows marked with ArchivedAt. A failed write leaves them unmarked, and a failed acknowledgement is retried without duplicating archived rows.
  4. Log. Each write logs the destination file, rows added and file size. The service then reports the total rows, files and compressed bytes across all archives.

Failures are caught and logged, and the service tries again on the next cycle. The Purger⁠ removes only rows that have been archived.

⁠Configuration

The service is configured entirely via environment variables:

VariableRequiredDescription
CONNECTION_STRINGYesPostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db). The service fails to start if it is missing.
DIRECTORY_PATHNoRoot directory the archive files are written under. Defaults to /tmp/repodb/telemetry/extended.
FREQUENCY_IN_MINUTESNoMinutes between cycles. Defaults to 60.
ARCHIVE_BATCH_SIZENoMaximum number of rows archived per cycle. Defaults to 10000.
LOG_LEVELNoLogging verbosity (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG.

Tag summary

Content type

Image

Digest

sha256:cc4746cc4…

Size

146.1 MB

Last updated

16 days ago

docker pull repodb/telemetry-extended-filedatasinker