Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noredink/tracing-newrelic
A Haskell package to report to NewRelic using the New Relic C SDK
https://github.com/noredink/tracing-newrelic
Last synced: about 2 months ago
JSON representation
A Haskell package to report to NewRelic using the New Relic C SDK
- Host: GitHub
- URL: https://github.com/noredink/tracing-newrelic
- Owner: NoRedInk
- License: mit
- Created: 2019-11-15T14:34:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-07T08:36:59.000Z (almost 4 years ago)
- Last Synced: 2024-05-08T23:22:50.843Z (8 months ago)
- Language: Haskell
- Size: 35.2 KB
- Stars: 6
- Watchers: 21
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tracing.Newrelic
[![Travis CI Build Status](https://travis-ci.org/NoRedInk/tracing-newrelic.svg)](https://travis-ci.org/NoRedInk/tracing-newrelic)
`Tracing.Newrelic` is a Haskell package to report to [New Relic](https://newrelic.com/).
It works by wrapping the [New Relic C SDK](https://github.com/newrelic/c-sdk).
To use this package you need to have the NewRelic daemon running. To do this, please
download the [New Relic C SDK](https://github.com/newrelic/c-sdk) and follow the steps
described [here](https://github.com/newrelic/c-sdk#building-the-c-sdk).## Example usage
```haskell
{-# 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 cabalrun
```
cabal update
cabal configure --enable-tests
cabal build
cabal test
```to build and test the project