Skip to content

Commit

Permalink
refactor(postgres): move and rename pg trace plugin registering
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofnds committed Sep 16, 2023
1 parent 34555f9 commit 705b47c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adapter/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ var (

Providers = fx.Options(
fx.Provide(NewGORMDB),
fx.Invoke(RegisterPlugins),
fx.Provide(NewSQLDB),
fx.Provide(NewHealthChecker),
)
Invokes = fx.Options(
fx.Invoke(EnableTracing),
fx.Invoke(HookConnection),
)
)
Expand All @@ -42,7 +42,7 @@ func NewGORMDB(postgresConfig Config, logger *zap.Logger) (*gorm.DB, error) {
)
}

func RegisterPlugins(db *gorm.DB) error {
func EnableTracing(db *gorm.DB) error {
return db.Use(tracing.NewPlugin())
}

Expand Down

0 comments on commit 705b47c

Please sign in to comment.