ghcide-2.9.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.Core.Tracing

Synopsis

- otTracedHandler :: MonadUnliftIO m => String -> String -> (SpanInFlight -> m a) -> m a
- otTracedAction :: Show k => k -> NormalizedFilePath -> RunMode -> (a -> String) -> (([FileDiagnostic] -> Action ()) -> Action (RunResult a)) -> Action (RunResult a)
- otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a
- otSetUri :: SpanInFlight -> Uri -> IO ()
- otTracedGarbageCollection :: (MonadMask f, MonadIO f, Show a) => ByteString -> f [a] -> f [a]
- withTrace :: (MonadMask m, MonadIO m) => String -> ((String -> String -> m ()) -> m a) -> m a
- withEventTrace :: (MonadMask m, MonadIO m) => String -> ((ByteString -> m ()) -> m a) -> m a
- withTelemetryRecorder :: (MonadIO m, MonadMask m) => (Recorder (WithPriority (Doc a)) -> m c) -> m c

# Documentation

otTracedHandler #

Arguments

:: MonadUnliftIO m |
=> String | Message type
-> String | Message label
-> (SpanInFlight -> m a) |
-> m a |

Trace a handler using OpenTelemetry. Adds various useful info into tags in the OpenTelemetry span.

otTracedAction #

Arguments

:: Show k |
=> k | The Action's Key
-> NormalizedFilePath | Path to the file the action was run for
-> RunMode |
-> (a -> String) |
-> (([FileDiagnostic] -> Action ()) -> Action (RunResult a)) | The action
-> Action (RunResult a) |

Trace a Shake action using opentelemetry.

otTracedProvider :: MonadUnliftIO m => PluginId -> ByteString -> m a -> m a #

otSetUri :: SpanInFlight -> Uri -> IO () #

otTracedGarbageCollection :: (MonadMask f, MonadIO f, Show a) => ByteString -> f [a] -> f [a] #

withTrace :: (MonadMask m, MonadIO m) => String -> ((String -> String -> m ()) -> m a) -> m a #

withEventTrace :: (MonadMask m, MonadIO m) => String -> ((ByteString -> m ()) -> m a) -> m a #

withTelemetryRecorder :: (MonadIO m, MonadMask m) => (Recorder (WithPriority (Doc a)) -> m c) -> m c #

Returns a logger that produces telemetry events in a single span