fix(users/Profpatsch/MonadPostgres): fix query logging msg

Change-Id: Ic499a59002fa4860067589ff2d187795e6013066
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11640
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2024-05-09 14:11:12 +02:00 committed by clbot
parent 15054715d6
commit 0a9b5efac9

View file

@ -460,7 +460,7 @@ executeManyImpl ::
NonEmpty params -> NonEmpty params ->
Transaction m (Label "numberOfRowsAffected" Natural) Transaction m (Label "numberOfRowsAffected" Natural)
executeManyImpl zoomTools zoomDebugLogDatabaseQueries qry params = executeManyImpl zoomTools zoomDebugLogDatabaseQueries qry params =
Otel.inSpan' "Postgres Query (execute)" Otel.defaultSpanArguments $ \span -> do Otel.inSpan' "Postgres Query (executeMany)" Otel.defaultSpanArguments $ \span -> do
tools <- lift @Transaction zoomTools tools <- lift @Transaction zoomTools
logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries
traceQueryIfEnabled tools span logDatabaseQueries qry (HasMultiParams params) traceQueryIfEnabled tools span logDatabaseQueries qry (HasMultiParams params)
@ -489,7 +489,7 @@ executeManyReturningWithImpl ::
Transaction m [r] Transaction m [r]
{-# INLINE executeManyReturningWithImpl #-} {-# INLINE executeManyReturningWithImpl #-}
executeManyReturningWithImpl zoomTools zoomDebugLogDatabaseQueries qry params (Decoder fromRow) = do executeManyReturningWithImpl zoomTools zoomDebugLogDatabaseQueries qry params (Decoder fromRow) = do
Otel.inSpan' "Postgres Query (execute)" Otel.defaultSpanArguments $ \span -> do Otel.inSpan' "Postgres Query (executeManyReturning)" Otel.defaultSpanArguments $ \span -> do
tools <- lift @Transaction zoomTools tools <- lift @Transaction zoomTools
logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries
traceQueryIfEnabled tools span logDatabaseQueries qry (HasMultiParams params) traceQueryIfEnabled tools span logDatabaseQueries qry (HasMultiParams params)
@ -582,7 +582,7 @@ queryWithImpl ::
Transaction m [r] Transaction m [r]
{-# INLINE queryWithImpl #-} {-# INLINE queryWithImpl #-}
queryWithImpl zoomTools zoomDebugLogDatabaseQueries qry params (Decoder fromRow) = do queryWithImpl zoomTools zoomDebugLogDatabaseQueries qry params (Decoder fromRow) = do
Otel.inSpan' "Postgres Query (execute)" Otel.defaultSpanArguments $ \span -> do Otel.inSpan' "Postgres Query (queryWith)" Otel.defaultSpanArguments $ \span -> do
tools <- lift @Transaction zoomTools tools <- lift @Transaction zoomTools
logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries logDatabaseQueries <- lift @Transaction zoomDebugLogDatabaseQueries
traceQueryIfEnabled tools span logDatabaseQueries qry (HasSingleParam params) traceQueryIfEnabled tools span logDatabaseQueries qry (HasSingleParam params)