Menu ▾ ▴

#22 [FEATURE]: PostgreSQL & TimescaleDB Storage Adapter

open
nobody
enhancement (4)
6 days ago
6 days ago
Anonymous
No

Originally created by: ankit-kumar-khandelwal

Problem Statement

TracerNest currently supports SQLite and MySQL storage, but lacks PostgreSQL support.

Enterprise applications generating high volumes of application logs, HTTP telemetry, and operational events need scalable relational storage with efficient time-series data management.

TimescaleDB provides hypertable partitioning, automatic chunk management, and optimized time-based queries, making it a valuable storage option for high-throughput observability workloads.

Proposed Solution

Extend TracerNest's existing zero-dependency SQL storage architecture with a PostgreSQL and TimescaleDB adapter.

Key requirements:

  • Support PostgreSQL connection strings (postgres:// and postgresql://).
  • Support configurable PostgreSQL connection settings and connection pooling.
  • Maintain compatibility with the existing storage abstraction.
  • Support TimescaleDB hypertable creation and management for telemetry tables.
  • Enable time-based partitioning using configurable timestamp columns.
  • Support automatic chunk interval configuration and retention policies where available.
  • Preserve existing SQLite and MySQL functionality.
  • Maintain the zero-runtime-dependency philosophy through native protocol support or externally supplied PostgreSQL connections.
  • Provide migration and configuration documentation.

Expected Behaviour

Users should be able to configure PostgreSQL as their storage dialect with minimal changes to their existing TracerNest integration.

Expected capabilities:

  1. Connect to PostgreSQL using a connection string or an externally supplied connection pool.
  2. Automatically initialize the required database schema.
  3. Optionally enable TimescaleDB hypertables for supported telemetry tables.
  4. Partition high-volume logs by timestamp for efficient inserts and historical queries.
  5. Support time-range filtering, retention, and efficient data cleanup.
  6. Preserve existing logging, dashboard, authentication, and telemetry functionality.
  7. Allow users to switch between SQLite, MySQL, and PostgreSQL without changing application-level logging APIs.

Related

Tickets: #20

Discussion


Log in to post a comment.