Tracing.Newrelic
is a Haskell package to report to New Relic.
It works by wrapping the New Relic C SDK.
To use this package you need to have the NewRelic daemon running. To do this, please download the New Relic C SDK and follow the steps described here.
{-# LANGUAGE OverloadedStrings #-}
import Tracing.NewRelic
main :: IO ()
main = do
appConfig <- createAppConfig (AppName "My app") (LicenseKey "*****")
app <- createApp appConfig (TimeoutMs 10000)
tx <- startWebTransaction app "Here comes a request"
segment <- startSegment tx (Just "Some name") (Just "Some category")
-- Some expensive computation...
_ <- endSegment segment
_ <- endTransaction tx
This project uses vanilla cabal
run
cabal update
cabal configure --enable-tests
cabal build
cabal test
to build and test the project