about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/whatcd-resolver')
-rw-r--r--users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs15
1 files changed, 1 insertions, 14 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
index c105de9affe7..5498cb235fd6 100644
--- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
+++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
@@ -41,7 +41,6 @@ import Network.HTTP.Types qualified as Http
 import Network.Wai qualified as Wai
 import Network.Wai.Handler.Warp qualified as Warp
 import OpenTelemetry.Trace qualified as Otel hiding (getTracer, inSpan)
-import OpenTelemetry.Trace qualified as OtelTrace
 import OpenTelemetry.Trace.Monad qualified as Otel
 import PossehlAnalyticsPrelude
 import Postgres.Decoder qualified as Dec
@@ -918,7 +917,7 @@ migrate ::
     Otel.MonadTracer m
   ) =>
   Transaction m (Label "numberOfRowsAffected" Natural)
-migrate = inSpanT "Database Migration" $ do
+migrate = inSpan "Database Migration" $ do
   execute_
     [sql|
     CREATE SCHEMA IF NOT EXISTS redacted;
@@ -1048,18 +1047,6 @@ getBestTorrents = do
 inSpan :: (MonadUnliftIO m, Otel.MonadTracer m) => Text -> m a -> m a
 inSpan name = Otel.inSpan name Otel.defaultSpanArguments
 
-inSpanT :: (Otel.MonadTracer m, MonadUnliftIO m) => Text -> Transaction m b -> Transaction m b
-inSpanT name transaction = do
-  tracer <- lift @Transaction $ Otel.getTracer
-  -- I don’t want to implement MonadTracer for Transaction,
-  -- so I’m unlifting it via IO, that should work :P
-  withRunInIO $ \runInIO -> do
-    OtelTrace.inSpan
-      tracer
-      name
-      Otel.defaultSpanArguments
-      (runInIO transaction)
-
 hush :: Either a1 a2 -> Maybe a2
 hush (Left _) = Nothing
 hush (Right a) = Just a