Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ruanitto/adonis5-sentry

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ruanitto/adonis5-sentry

Sentry provider for AdonisJS 5

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Adonis5-Sentry

Sentry, Sentry SDK for Node JS , AdonisJS, Sentry for Adonis

typescript-image npm-image license-image

Sentry service provider for Adonis-5

Table of contents

Installation

npm i --save adonis5-sentry

Compile your code:

node ace serve --watch

Connect all dependences:

node ace invoke adonis5-sentry
  • For other configuration, please update the config/sentry.ts.

Sample Usage

After loading all providers Sentry service will be initialized. After this you can import Sentry service anywhere in your application in such way:

 import Sentry from '@ioc:Adonis/Addons/Sentry'
  • Then you have to send your error details to Sentry. You can use Adonis Exception Handler for this purposes. For example you can implement such Exception Handler:
    import Sentry from '@ioc:Adonis/Addons/Sentry'  
    import Logger from '@ioc:Adonis/Core/Logger'
    import HttpExceptionHandler from '@ioc:Adonis/Core/HttpExceptionHandler'
    
    export default class ExceptionHandler extends HttpExceptionHandler {
      constructor () {
        super(Logger)
      }
    
      public async handle (error, ctx) {
        Sentry.captureException(error)
        return super.handle(error, ctx)
      }
    }
    

For additional details of Sentry API, please check the Sentry SDK documentation by this link Sentry docs

Keywords

FAQs

Package last updated on 18 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc