forked from mtusi2026/mtusi2026lab6
feat(storage): lab6 add PostgreSQL, Redis and S3 tracing and DB pool metrics
This commit is contained in:
@@ -56,6 +56,13 @@ func main() {
|
||||
}
|
||||
defer pool.Close()
|
||||
|
||||
registration, err := postgres.ObservePool(pool)
|
||||
if err != nil {
|
||||
slog.Warn("Не удалось зарегистрировать метрики пула", "error", err)
|
||||
} else {
|
||||
defer registration.Unregister()
|
||||
}
|
||||
|
||||
store := postgres.New(pool)
|
||||
objectStorage, err := s3store.New(ctx, s3store.Config{
|
||||
Endpoint: cfg.S3Endpoint,
|
||||
|
||||
Reference in New Issue
Block a user