rollbar-client 1.0.0 → 1.1.0
raw patch · 5 files changed
+50/−29 lines, 5 filesdep ~textnew-uploader
Dependency ranges changed: text
Files
- ChangeLog.md +8/−1
- LICENSE +1/−1
- rollbar-client.cabal +8/−8
- src/Rollbar/Client.hs +1/−1
- src/Rollbar/Client/Item.hs +32/−18
ChangeLog.md view
@@ -1,6 +1,13 @@ # Changelog for rollbar-client -All notable changes to this project will be documented in this file+All notable changes to this project will be documented in this file.++## [1.1.0] - 2024-05-28++### Changed+- Added fields fingerprint, title, uuid, custom to `Item`+- Added support for GHC 9.4+- Changed `text` dependency upper bound: we now support `text-2.0.X.X`. ## [1.0.0] - 2022-12-28
LICENSE view
@@ -1,4 +1,4 @@-Copyright 2020 Stack Builders Inc.+Copyright 2020-present Stack Builders Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in
rollbar-client.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.7.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack ----- hash: 125ccbaa8f8a1b3dab026c05c979880711d5f61ef9cf7323bfe23bda09bb3743+-- hash: 372dae78f9159532940f589cb4a58365621fc289aae679dfac95e4b6ba477ed7 name: rollbar-client-version: 1.0.0+version: 1.1.0 synopsis: Core library to communicate with Rollbar API. description: Please see the README on GitHub at <https://github.com/stackbuilders/rollbar-haskell/tree/master/rollbar-client>@@ -15,12 +15,12 @@ homepage: https://github.com/stackbuilders/rollbar-haskell#readme bug-reports: https://github.com/stackbuilders/rollbar-haskell/issues author: Stack Builders Inc.-maintainer: Sebastián Estrella <sestrella@stackbuilders.com>-copyright: 2020 Stack Builders Inc.+maintainer: David Mazarro <dmunuera@stackbuilders.com>+copyright: 2020-present Stack Builders Inc. license: MIT license-file: LICENSE tested-with:- GHC ==8.8.4, GHC ==8.10.2+ GHC ==8.8.4, GHC ==8.10.7, GHC ==9.4.7 build-type: Simple extra-source-files: README.md@@ -57,7 +57,7 @@ , mtl >=2.2 && <3 , process >=1.6 && <2 , req >=2.1 && <4- , text >=1.2 && <2+ , text >=1.2 && <2.1 , unordered-containers >=0.2 && <1 , yaml >=0.11 && <1 default-language: Haskell2010@@ -73,11 +73,11 @@ base >=4.13 && <5 , rollbar-client , text+ default-language: Haskell2010 if flag(example) buildable: True else buildable: False- default-language: Haskell2010 test-suite spec type: exitcode-stdio-1.0
src/Rollbar/Client.hs view
@@ -2,7 +2,7 @@ -- | -- Module: Rollbar.Client--- Copyright: (c) 2020 Stack Builders Inc.+-- Copyright: (c) 2020-present Stack Builders Inc. -- License: MIT -- Maintainer: Sebastián Estrella <sestrella@stackbuilders.com> module Rollbar.Client
src/Rollbar/Client/Item.hs view
@@ -80,28 +80,38 @@ , itemServer :: Maybe Server -- ^ Data about the server related to this event. -- client- -- custom- -- fingerprint- -- title- -- uuid+ , custom :: Maybe Object+ -- ^ Any arbitrary metadata you want to send.+ , title :: Maybe Text+ -- ^ A string that will be used as the title of the Item occurrences will be grouped into.+ , uuid :: Maybe Text+ -- ^ Identifies this occurrence.+ , fingerprint :: Maybe Text+ -- ^ Controlls how this occurrence should be grouped. , itemNotifier :: Notifier -- ^ Describes the library used to send this event. } deriving (Eq, Show) instance ToJSON Item where- toJSON Item{..} = object- [ "data" .= object- [ "environment" .= itemEnvironment- , "body" .= itemBody- , "level" .= itemLevel- , "platform" .= itemPlatform- , "language" .= itemLanguage- , "framework" .= itemFramework- , "request" .= itemRequest- , "server" .= itemServer- , "notifier" .= itemNotifier- ]- ]+ toJSON Item{..} =+ let dataFields =+ [ "environment" .= itemEnvironment+ , "body" .= itemBody+ , "level" .= itemLevel+ , "platform" .= itemPlatform+ , "language" .= itemLanguage+ , "framework" .= itemFramework+ , "request" .= itemRequest+ , "server" .= itemServer+ , "notifier" .= itemNotifier+ ] ++ catMaybes+ [ ("custom" .=) <$> custom+ , ("fingerprint" .=) <$> fingerprint+ , ("title" .=) <$> title+ , ("uuid" .=) <$> uuid+ ]+ in+ object [ "data" .= object dataFields ] -- | Builds an 'Item' based on a 'Payload'. mkItem@@ -129,6 +139,10 @@ , serverCodeVersion = Nothing } , itemNotifier = defaultNotifier+ , custom = Nothing+ , title = Nothing+ , uuid = Nothing+ , fingerprint = Nothing } -- | The main data being sent. It can either be a message, an exception, or a@@ -361,7 +375,7 @@ defaultNotifier :: Notifier defaultNotifier = Notifier { notifierName = "rollbar-client"- , notifierVersion = "1.0.0"+ , notifierVersion = "1.1.0" } newtype ItemId = ItemId Text