@@ -58,6 +58,14 @@ import OpenTelemetry.Eventlog (SpanInFlight (..), addEvent,
58
58
mkValueObserver , observe ,
59
59
setTag , withSpan , withSpan_ )
60
60
61
+ #if MIN_VERSION_ghc(8,8,0)
62
+ otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a
63
+ otTracedGarbageCollection :: (MonadMask f , MonadIO f , Show a ) => ByteString -> f [a ] -> f [a ]
64
+ #else
65
+ otTracedProvider :: MonadUnliftIO m => PluginId -> String -> m a -> m a
66
+ otTracedGarbageCollection :: (MonadMask f , MonadIO f , Show a ) => String -> f [a ] -> f [a ]
67
+ #endif
68
+
61
69
-- | Trace a handler using OpenTelemetry. Adds various useful info into tags in the OpenTelemetry span.
62
70
otTracedHandler
63
71
:: MonadUnliftIO m
@@ -109,7 +117,6 @@ otTracedAction key file mode result act
109
117
(const act)
110
118
| otherwise = act
111
119
112
- otTracedGarbageCollection :: (MonadMask f , MonadIO f , Show a ) => ByteString -> f [a ] -> f [a ]
113
120
otTracedGarbageCollection label act
114
121
| userTracingEnabled = fst <$>
115
122
generalBracket
@@ -123,11 +130,6 @@ otTracedGarbageCollection label act
123
130
(const act)
124
131
| otherwise = act
125
132
126
- #if MIN_VERSION_ghc(8,8,0)
127
- otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a
128
- #else
129
- otTracedProvider :: MonadUnliftIO m => PluginId -> String -> m a -> m a
130
- #endif
131
133
otTracedProvider (PluginId pluginName) provider act
132
134
| userTracingEnabled = do
133
135
runInIO <- askRunInIO
0 commit comments