about summary refs log tree commit diff
path: root/users/Profpatsch/my-prelude
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/my-prelude')
-rw-r--r--users/Profpatsch/my-prelude/my-prelude.cabal1
-rw-r--r--users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs2
2 files changed, 3 insertions, 0 deletions
diff --git a/users/Profpatsch/my-prelude/my-prelude.cabal b/users/Profpatsch/my-prelude/my-prelude.cabal
index c811c00e0a..658c427289 100644
--- a/users/Profpatsch/my-prelude/my-prelude.cabal
+++ b/users/Profpatsch/my-prelude/my-prelude.cabal
@@ -82,6 +82,7 @@ library
      , aeson-better-errors
      , bytestring
      , containers
+     , unordered-containers
      , resource-pool
      , resourcet
      , scientific
diff --git a/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs
index 45c94b2009..55cedb336c 100644
--- a/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs
+++ b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs
@@ -13,6 +13,7 @@ import Control.Monad.Reader (MonadReader (ask), ReaderT (..))
 import Control.Monad.Trans.Resource
 import Data.Aeson (FromJSON)
 import Data.Error.Tree
+import Data.HashMap.Strict qualified as HashMap
 import Data.Int (Int64)
 import Data.Kind (Type)
 import Data.List qualified as List
@@ -539,6 +540,7 @@ traceQueryIfEnabled tools span logDatabaseQueries qry params = do
   let doLog errs =
         Otel.addAttributes
           span
+          $ HashMap.fromList
           $ ( ("postgres.query", Otel.toAttribute @Text errs.query)
                 : ( errs.explain
                       & foldMap