From a6b4134468ad6a286a0caf9671ceab368a363192 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 11 May 2024 23:08:26 +0200 Subject: [PATCH] refactor(users/Profpatsch/MonadPostgres): rephrase maybe match wtf was I thinking Change-Id: Ia621032d90d7a9363dfe2bfbed122c67c90468f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11651 Reviewed-by: Profpatsch Autosubmit: Profpatsch Tested-by: BuildkiteCI --- users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs index 7e4e75d8e..8d82eb553 100644 --- a/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs +++ b/users/Profpatsch/my-prelude/src/Postgres/MonadPostgres.hs @@ -718,10 +718,9 @@ traceQueryIfEnabled tools span logDatabaseQueries qry params = do $ HashMap.fromList $ ( ("_.postgres.query", Otel.toAttribute @Text errs.query) : ( errs.explain - & foldMap - ( \ex -> - [("_.postgres.explain", Otel.toAttribute @Text ex)] - ) + & \case + Nothing -> [] + Just ex -> [("_.postgres.explain", Otel.toAttribute @Text ex)] ) ) let doExplain = do