All Projects → jsynowiec → good-sentry

jsynowiec / good-sentry

Licence: MIT license
Sentry broadcasting for good process monitor

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to good-sentry

hapi-good-winston
A good reporter to send and log events with winston
Stars: ✭ 21 (+40%)
Mutual labels:  good, hapi, hapijs, hapi-good
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+39980%)
Mutual labels:  sentry, raven, sentry-client
aiohttp-sentry
An aiohttp server middleware for reporting failed requests to Sentry
Stars: ✭ 35 (+133.33%)
Mutual labels:  sentry, raven, sentry-client
hapi-sentry
A hapi plugin for request error logging to Sentry
Stars: ✭ 24 (+60%)
Mutual labels:  hapi, sentry, hapi-sentry
next-utils
🥩 🍳 A set of Next.js HoC utilities to make your life easier
Stars: ✭ 30 (+100%)
Mutual labels:  sentry, sentry-client
sanic-sentry
Sentry integration to sanic web server
Stars: ✭ 31 (+106.67%)
Mutual labels:  sentry, raven
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+10506.67%)
Mutual labels:  sentry, sentry-client
nodejs-tutorials-hapi
Examples for the hapi tutorial series within the Future Studio University
Stars: ✭ 70 (+366.67%)
Mutual labels:  hapi, hapijs
crow
Crow - a C++ client for Sentry
Stars: ✭ 119 (+693.33%)
Mutual labels:  sentry, sentry-client
Raven Python
Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
Stars: ✭ 1,677 (+11080%)
Mutual labels:  sentry, sentry-client
hapi-plugin-mysql
Hapi plugin for MySQL
Stars: ✭ 17 (+13.33%)
Mutual labels:  hapi, hapijs
sentry-testkit
A Sentry plugin to allow Sentry report interception and further inspection of the data being sent
Stars: ✭ 78 (+420%)
Mutual labels:  sentry, raven
nextcloud sentry
Sentry integration for Nextcloud
Stars: ✭ 26 (+73.33%)
Mutual labels:  sentry, sentry-client
typesafe-hapi
Typechecking for HapiJS based on Joi schemas!
Stars: ✭ 21 (+40%)
Mutual labels:  hapi, hapijs
raven-python-lambda
Sentry/Raven SDK Integration For AWS Lambda (python) and Serverless
Stars: ✭ 48 (+220%)
Mutual labels:  sentry, raven
sapper-authentication-demo
A demonstration of Auth with Sapper + JWT + Server Side Rendering + RBAC
Stars: ✭ 102 (+580%)
Mutual labels:  hapi, hapijs
hapi-cli
CLI to build API with Hapi, mongodb and mongoose. Work with Hapi V17.
Stars: ✭ 36 (+140%)
Mutual labels:  hapi, hapijs
hapi-moon
Hassle-free and production ready hapi.js Server boilerplate
Stars: ✭ 23 (+53.33%)
Mutual labels:  hapi, hapijs
zend-sentry
A Zend Framework 3 module that lets you log to the Sentry.io service.
Stars: ✭ 34 (+126.67%)
Mutual labels:  sentry, raven
redux-sentry
Middleware that logs all your store and actions on exception to Sentry with raven-js
Stars: ✭ 13 (-13.33%)
Mutual labels:  sentry, raven

good-sentry

Sentry broadcasting for good process monitor.

good-sentry is a write stream used to send hapi server events to a Sentry server.

Current Version Build Status License

Usage

new GoodSentry ([options])

Creates a new GoodSentry object with the following arguments:

  • [options] - optional configuration object with the following keys
    • [dsn] - Sentry project's Data Source Name. Defaults to null but expects SENTRY_DSN environment variable to be set.
    • [config] - optional configuration object with the following keys
      • [name] - The name of the logger used by Sentry. Defaults to hostname. Optionally set the name using SENTRY_NAME environment variable.
      • [logger] - The name of the Sentry client. Defaults to ''.
      • [release] - The version/release of your application. Defaults to ''. Optionally set the release using SENTRY_RELEASE environment variable.
      • [environment] - The environment name of your application. Defaults to ''. Optionally set the environment using SENTRY_ENVIRONMENT environment variable.
    • [captureUncaught] - Enable global error handling. Defaults to false.

Tags

Because Hapi tags are an array of strings and Sentry expects tags to be a k/v map, good-sentry sets all tags associated with an event to tag: true pairs. Those are nicely displayed in the tags section of Sentry web interface:

Tags in Sentry

Example Usage

const Hapi = require('hapi');
const version = require('package.json').version;
const server = new Hapi.Server();
server.connection();

const options = {
  reporters: {
    mySentryReporter: [{
      module: 'good-squeeze',
      name: 'Squeeze',
      args: [{ log: '*' }],
    }, {
      module: 'good-sentry',
      args: [ {
        dsn: 'https://<key>:<secret>@sentry.io/<project>',
        config: {
          name: 'myAwesomeHapiServer',
          logger: 'mySentryReporter',
          release: version,
          environment: process.env.NODE_ENV,
        },
        captureUncaught: true,
      }],
    }],
  },
};

server.register({
    register: require('good'),
    options,
}, (err) => {
  server.start(() => {
    server.log([], 'Sample debug event.');
    server.log(['debug'], 'Sample tagged debug event.');
    server.log(['info'], 'Sample info event.');
    server.log(['warning', 'server'], 'Sample warning event with tags.');
    server.log(['error', 'first-tag', 'second-tag'], 'Sample error event with tags.');
    
    // Throw an error after 5 seconds
    setTimeout(() => {
      throw new Error('An uncaught error');
    }, 5000);
  });
});

This example sets up the reporter named mySentryReporter to listen for server events and send them to a Sentry project with additional settings.

License

Released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].