mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-02-12 11:19:14 -06:00
feat: include query params in pgx spans to improve debuggability
This commit is contained in:
@@ -167,7 +167,10 @@ func (c *ConfigLoader) InitDataLayer() (res *database.Layer, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
config.ConnConfig.Tracer = otelpgx.NewTracer()
|
||||
config.ConnConfig.Tracer = otelpgx.NewTracer(
|
||||
// for options, see: https://github.com/exaring/otelpgx/blob/main/options.go
|
||||
otelpgx.WithIncludeQueryParameters(),
|
||||
)
|
||||
|
||||
if cf.MaxConns != 0 {
|
||||
config.MaxConns = int32(cf.MaxConns) // nolint: gosec
|
||||
@@ -217,7 +220,10 @@ func (c *ConfigLoader) InitDataLayer() (res *database.Layer, err error) {
|
||||
}
|
||||
|
||||
readReplicaConfig.MaxConnLifetime = 15 * 60 * time.Second
|
||||
readReplicaConfig.ConnConfig.Tracer = otelpgx.NewTracer()
|
||||
readReplicaConfig.ConnConfig.Tracer = otelpgx.NewTracer(
|
||||
// for options, see: https://github.com/exaring/otelpgx/blob/main/options.go
|
||||
otelpgx.WithIncludeQueryParameters(),
|
||||
)
|
||||
|
||||
readReplicaPool, err = pgxpool.NewWithConfig(context.Background(), readReplicaConfig)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user