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/postgrespackage: instrumented PostgreSQL client implementingapp.Component- Exposes
*sql.DBviapgx/v5/stdlibinstead 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
QueryTracerinterface -
Start(ctx)verifies database connectivity - Compile-time
app.Componentinterface assertion
- Exposes
Dependencies
Depends on !337 (merged) (v2/app package).
Related
- gitlab-org/quality/quality-engineering/team-tasks#4290 (closed) (addressed: switch to database/sql interface)
- gitlab-org/quality/quality-engineering/team-tasks#4291 (closed) (follow-up: PgBouncer compatibility)
- gitlab-org/quality/quality-engineering/team-tasks#4301 (follow-up: database load balancing, now unblocked by database/sql interface)
Edited by Doug Barrett