Safe Haskell | None |
---|---|
Language | Haskell98 |
Structured data interfaces from Sentry core: http://sentry.readthedocs.org/en/latest/developer/interfaces/index.html#provided-interfaces
Synopsis
- message :: String -> [Value] -> SentryRecord -> SentryRecord
- exception :: String -> Maybe String -> Maybe String -> SentryRecord -> SentryRecord
- http :: String -> String -> HttpArgs -> Maybe String -> Maybe String -> [(String, String)] -> [(String, String)] -> SentryRecord -> SentryRecord
- data HttpArgs
- user :: String -> [(String, String)] -> SentryRecord -> SentryRecord
- query :: Maybe String -> String -> SentryRecord -> SentryRecord
- interface :: ToJSON v => String -> v -> SentryRecord -> SentryRecord
- fields :: [[(String, Value)]] -> HashMap String Value
- (.=:) :: ToJSON v => String -> v -> [(String, Value)]
- fromMaybe :: ToJSON v => String -> Maybe v -> [(String, Value)]
- fromAssoc :: String -> [(String, String)] -> [(String, Value)]
Core sentry interfaces
Message
:: String | Message text (no more than 1000 characters in length). |
-> [Value] | Formatting arguments |
-> SentryRecord | Record to update |
-> SentryRecord |
'sentry.interfaces.Message': A standard message consisting of a message arg, and an optional params arg for formatting.
Exception
:: String | Value |
-> Maybe String | Type |
-> Maybe String | Module |
-> SentryRecord | Record to update |
-> SentryRecord |
'sentry.interfaces.Exception': A standard exception with a mandatory value argument, and optional type and``module`` argument describing the exception class type and module namespace.
Http
:: String | URL |
-> String | Method |
-> HttpArgs | Arguments |
-> Maybe String | Query string |
-> Maybe String | Cookies |
-> [(String, String)] | Headers |
-> [(String, String)] | Environment |
-> SentryRecord | Record to update |
-> SentryRecord |
'sentry.interfaces.Http': The Request information is stored in the Http interface.
Sentry will explicitly look for REMOTE_ADDR in env for things which require an IP address.
The data variable should only contain the request body (not the query string). It can either be a dictionary (for standard HTTP requests) or a raw request body.
import System.Log.RavenInterfaces as SI let upd = SI.http "http://absolute.uri/foo" "POST" (SI.QueryArgs [("foo", "bar")]) (Just "hello=world") (Just "foo=bar") [("Content-Type", "text/html")] [("REMOTE_ADDR", "127.1.0.1")]
User
:: String | User's unique identifier |
-> [(String, String)] | Optional user data |
-> SentryRecord | Record to update |
-> SentryRecord |
'sentry.interfaces.User': An interface which describes the authenticated User for a request.
let upd = SI.user "unique_id" [ ("username", "my_user") , ("email", "foo@example.com") ]
Query
:: Maybe String | SQL Driver |
-> String | Query |
-> SentryRecord | Record to update |
-> SentryRecord |
'sentry.interfaces.Query': A SQL query with an optional string describing the SQL driver, engine.
Generic interface helpers
interface :: ToJSON v => String -> v -> SentryRecord -> SentryRecord Source #
Generic interface helper.