Send reports to Rollbar.
Severity levels.
For example, "production", "development", or "staging".
Create one using environment.
Rollbar.environment "production"Create an Environment
Rollbar.environment "production"A code version, for example - a git commit hash.
Create one using codeVersion.
Rollbar.codeVersion "24dcf3a9a9cf1a5e2ea319018644a68f4743a731"Create a CodeVersion.
Rollbar.codeVersion "24dcf3a9a9cf1a5e2ea319018644a68f4743a731"Return a Rollbar record configured with the given
Environment and Scope string.
If the HTTP request to Rollbar fails because of an exceeded rate limit (status code 429), this will retry the HTTP request once per second, up to 60 times.
rollbar = Rollbar.scoped "Page/Home.elm"
rollbar.debug "Hitting the hats API." Dict.empty
[ ( "Payload", toString payload ) ]
|> Dict.fromList
|> rollbar.error "Unexpected payload from the hats API."Send a message to Rollbar. scoped
provides a nice wrapper around this.
Arguments:
Token - The Rollbar API token required to authenticate the request.Scope - Scoping messages essentially namespaces them. For example, this might be the name of the page the user was on when the message was sent.Environment - e.g. "production", "development", "staging", etc.Int - maximum retry attempts - if the response is that the message was rate limited, try resending again (once per second) up to this many times. (0 means "do not retry.")Level - severity, e.g. Error, Warning, DebugString - message, e.g. "Auth server was down when user tried to sign in."Dict String Value - arbitrary metadata, e.g. {"username": "rtfeldman"}If the message was successfully sent to Rollbar, the Task
succeeds with the Uuid
it generated and sent to Rollbar to identify the message. Otherwise it fails
with the Http.Error
responsible.
Functions preapplied with access tokens, scopes, and environments, separated by
Level.Create one using
scoped.