nri-observability-0.1.1.4: Report log spans collected by nri-prelude.
Safe HaskellNone
LanguageHaskell2010

Reporter.Dev

Description

Reporting for development This reporter logs basic information about requests in a human-readable format, for use in a development console.

The development logs produced are quite sparse. To dig deeper this reporter will also make tracing data available in the log-explorer tool. You can find it here:

https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-log-explorer

Synopsis

Documentation

report :: Handler -> Text -> TracingSpan -> IO () Source #

Print basic information about requests to stdout and make more detailed information available to the log-explorer tool.

Example usage: > handler <- Dev.handler > Dev.report handler "request-id" span

data Handler Source #

Contextual information this reporter needs to do its work. You can create one using handler.

handler :: IO Handler Source #

Create a Handler. Do this once when your application starts and reuse the Handler you get.

cleanup :: Handler -> IO () Source #

Clean up your handler after you're done with it. Call this before your application shuts down.