rollbar-wai-0.1.0: Provides error reporting capabilities to WAI based applications through Rollbar API.
Copyright(c) 2020 Stack Builders Inc.
LicenseMIT
MaintainerSebastián Estrella <sestrella@stackbuilders.com>
Safe HaskellNone
LanguageHaskell2010

Rollbar.Wai

Description

Synopsis

Documentation

rollbarOnException :: MonadIO m => Settings -> Maybe Request -> SomeException -> m () Source #

Sends the captured SomeException to Rollbar API using the given Settings. Under the hood, this function uses createItem function from rollbar-client.

Example

settings <- readSettings "rollbar.yaml"
runSettings
  (setOnException (rollbarOnException settings) defaultSettings)
  app

Since: 0.1.0

rollbarOnExceptionWith :: MonadIO m => (Item -> Rollbar ()) -> Settings -> Maybe Request -> SomeException -> m () Source #

Similar to rollbarOnExceptionWith, but it allows customize the function used to send the Item to Rollbar.

Since: 0.1.0

mkRequest :: MonadIO m => Request -> m Request Source #

Transforms a Wai Request into a Rollbar Request.

Since: 0.1.0