Skip to content

NoRedInk/tracing-newrelic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tracing.Newrelic

Travis CI Build Status

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.

Example usage

{-# 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

Building and testing

This project uses vanilla cabal

run

cabal update
cabal configure --enable-tests
cabal build
cabal test

to build and test the project

About

A Haskell package to report to NewRelic using the New Relic C SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •