New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

adonis-sentry

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-sentry

Sentry provider for adonis framework

latest
Source
npmnpm
Version
2.1.4
Version published
Weekly downloads
544
34.99%
Maintainers
1
Weekly downloads
 
Created
Source

adonis-sentry

Sentry provider for AdonisJS

npm version Build status GitHub license

Install

adonis install adonis-sentry

You need to add the provider to AdonisJS at start/app.js:

const providers = [
   ...
   'adonis-sentry/providers/Sentry',
];

and in your .env file

SENTRY_DSN=
SENTRY_ENVIRONMENT=

then you can use it as

const sentry = use('Sentry')

if you want to catch all the exceptions of your adonis project you must create an exception handler

adonis make:ehandler

and we need add sentry notify in app/Exceptions/Handler.js

'use strict'

const sentry = use('Sentry')

class ExceptionHandler extends BaseExceptionHandler {

  ...

  async report (error, { request }) {
    sentry.captureException(error)
  }
}

module.exports = ExceptionHandler

Testing configuration

You can test your configuration using the command:

adonis sentry:test

Official documentation for Node.js apps

https://docs.sentry.io/clients/node/

Issues & PR

It is always helpful if we try to follow certain practices when creating issues or PR's, since it will save everyone's time.

  • Always try creating regression tests when you find a bug (if possible).
  • Share some context on what you are trying to do, with enough code to reproduce the issue.
  • For general questions, please create a forum thread.
  • When creating a PR for a feature, make sure to create a parallel PR for docs too.

License

Adonis Sentry is open-sourced software licensed under the MIT license.

Gratefulness

I want to thank Zura for have created the previous provider.

Keywords

AdonisJs

FAQs

Package last updated on 03 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts