Skip to content

boga/pm2-sentrylogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pm2-sentrylogs

PM2 module to send logs to Sentry

Options:

Log should be JSON with this structure:

{
  "breadcrumbs": [
    {
      "category": "auth",
      "message": "Authenticated user user@domain.net",
      "level": 10
    },
    {
      "category": "db",
      "message": "Executed select query",
      "level": 20
    }
  ],
  "extra": {
    "firstVar": 12,
    "secondVar": false     
  },
  "fingerprint": [
    "{{ default }}",
    "signin",
    "checkUserInDb"
  ],
  "tags": {
    "requestId": 2128506,
    "os": "Android",
    "osVersion": "4.0.4"
  },
  "user": {
    "id": 1,
    "ip": "192.168.42.18"
  }
}

See https://docs.sentry.io/enriching-error-data for details

Installation

pm2 install boga/pm2-sentrylogs
pm2 set pm2-sentrylogs:sentry_dsn 'https://thisisnotactualid@sentry.io/4815162342' 
pm2 set pm2-sentrylogs:apps 'myapp'
pm2 set pm2-sentrylogs:environment 'production'

About

PM2 module to send logs to Sentry

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published