HUB
Sign inSign up
telemetry-extended-purger logo

repodb/telemetry-extended-purger

By repodb

•Updated 16 days ago

A background worker that periodically deletes expired extended telemetry from PGSQL telemetry table.

Image
Integration & delivery
Developer tools
Monitoring & observability
0

83

repodb/telemetry-extended-purger repository overview

⁠RepoDB Extended Telemetry Purger Service

A background worker that periodically deletes expired rows from the ExtendedTelemetry table of RepoDB PGSQL⁠, based on the StartTime column and a retention period. Only rows that the File Data Sinker⁠ has already archived are deleted.

⁠Running with Docker

Create the network (skip if it already exists):

docker network create repodb

Build the image:

docker build . -t repodb/telemetry-extended-purger:latest

Run the image:

docker run -d --name repodb-telemetry-extended-purger --cpus=0.25 \
  -e CONNECTION_STRING="postgresql://postgres:RepoDB2026@repodb-insights-postgres:5432/repodb_insights" \
  -e RETENTION_PERIOD_IN_MINUTES=10080 \
  -e FREQUENCY_IN_MINUTES=5 \
  --network=repodb \
  repodb/telemetry-extended-purger:latest

⁠Configuration

The service is configured entirely via environment variables:

VariableRequiredDescription
CONNECTION_STRINGYesPostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db).
RETENTION_PERIOD_IN_MINUTESNoRows older than this many minutes (relative to now) are eligible for deletion. Defaults to 10080 (7 days).
FREQUENCY_IN_MINUTESNoHow often the purge runs, in minutes. Also used to align run times to a fixed grid (e.g. every 5 minutes on the clock). Defaults to 5.
LOG_LEVELNoLogging verbosity (DEBUG, INFO, WARNING, etc.). Defaults to DEBUG.

⁠How It Works

On startup the service runs an immediate purge cycle and then repeats indefinitely:

  1. Compute the cutoff timestamp: now - RETENTION_PERIOD_IN_MINUTES, floored down to the nearest FREQUENCY_IN_MINUTES boundary.
  2. Delete rows from ExtendedTelemetry where StartTime is older than the cutoff and ArchivedAt is set.
  3. Sleep until the next scheduled run, without sleeping if that run is already overdue.

Failures are caught and logged so the service keeps running. If the File Data Sinker is offline, expired rows stay in PostgreSQL instead of being deleted, so telemetry is kept over enforcing a strict database size. The archived files are never deleted by this service.

Tag summary

Content type

Image

Digest

sha256:99c171b76…

Size

49.4 MB

Last updated

16 days ago

docker pull repodb/telemetry-extended-purger