feat(v2/postgres): Add instrumented PostgreSQL client with query tracing

Context

Part of the LabKit v2 package decomposition from the UAM PoC (!314).

Tracking issue: gitlab-org/quality/quality-engineering/team-tasks#4285 (closed) Parent epic: gitlab-org/quality#360

What's in this MR?

  • v2/postgres package: instrumented PostgreSQL client implementing app.Component
    • Exposes *sql.DB via pgx/v5/stdlib instead of *pgxpool.Pool, enabling compatibility with standard Go database tooling (ORMs, query builders, migration frameworks) and the Container Registry's load balancing code
    • Automatic OpenTelemetry query tracing via pgx's QueryTracer interface
    • Start(ctx) verifies database connectivity
    • Compile-time app.Component interface assertion

Dependencies

Depends on !337 (merged) (v2/app package).

Edited by Doug Barrett

Merge request reports

Loading