feat(storage): lab6 add PostgreSQL, Redis and S3 tracing and DB pool metrics

This commit is contained in:
Голиков Maximillian Антон
2026-11-16 14:48:07 +03:00
parent c403b23595
commit 472b4761d6
11 changed files with 225 additions and 3 deletions
+6
View File
@@ -47,6 +47,12 @@ func Connect(ctx context.Context, cfg Config) (*pgxpool.Pool, error) {
}
poolCfg.HealthCheckPeriod = 10 * time.Second
tracer, err := newPoolTracer()
if err != nil {
return nil, fmt.Errorf("метрики пула: %w", err)
}
poolCfg.ConnConfig.Tracer = tracer
pool, err := pgxpool.NewWithConfig(ctx, poolCfg)
if err != nil {
return nil, fmt.Errorf("создание пула: %w", err)