ice cream bar
hapi plugin for Rollbar error logging
quick and easy
let accessToken = processenvROLLBAR_SERVER_ITEM_ACCESS_TOKEN; server;
thorough example
// http://hapijs.com/api#servervar Hapi = ;var server = ;server; server; let accessToken = processenvROLLBAR_SERVER_ITEM_ACCESS_TOKEN; server;
person tracking
The personTracking option toggles passing user identifiers to Rollbar with errors and messages. To enable this feature, include personTracking: true
in your options object. By default, this feature inspects request.auth.credentials
for id
, email
and username
parameters to send along with Rollbar requests. If your application uses different key names then you can configure them via an object as follows;
let accessToken = processenvROLLBAR_SERVER_ITEM_ACCESS_TOKEN; server;
uncaught exceptions
This feature should only be registered on the project level; i.e., do not enable it in your plugin(s), as the result could be unexpeted error reporting and/or duplicated errors. To leverage this feature, either require the rollbar module directly or access a registered instance (e.g. server.plugins.icecreambar
). Either way, it'll look something like this:
var rollbar = ; // this requires `rollbar` is installed to your `node_modules` foldervar rollbar = serverpluginsicecreambar; // this requires that you've registered `icecreambar` without a scope, or explicitly named the scope `default`. you can substitute `default` for any registered scope. rollbar;
important
As of version 4.0.0 this module no longer supports scopes
and can only be registered once. There is only one rollbar instance -- server.plugins.icecreambar
. icecreambar.default
continues to exist as a deprecated alias.