https://github.com/actionhero/ah-sentry-plugin
Record your errors with Sentry
https://github.com/actionhero/ah-sentry-plugin
Last synced: 10 months ago
JSON representation
Record your errors with Sentry
- Host: GitHub
- URL: https://github.com/actionhero/ah-sentry-plugin
- Owner: actionhero
- Created: 2020-08-14T23:20:42.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2021-05-10T15:47:58.000Z (about 5 years ago)
- Last Synced: 2025-01-03T04:47:16.219Z (over 1 year ago)
- Language: TypeScript
- Size: 1.65 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## AH-SENTRY-PLUGIN
A Plugin to report your Actionhero errors to Sentry.io

## Setup
1. Install this plugin: `npm install ah-sentry-plugin --save`
2. Add plugin to your project's `./src/config/plugins.ts`:
```ts
import * as path from "path";
export const DEFAULT = {
plugins: () => {
return {
"ah-sentry-plugin": {
path: path.join(process.cwd(), "node_modules", "ah-sentry-plugin"),
},
};
},
};
```
### Configuration
A `./src/config/sentry.ts` will need to be created for your project. This will source the `SENTRY_DSN` environment variable into `config.sentry.dsn`. If you want to record APM transactions, also set `SENTRY_SAMPLE_RATE`
```ts
export const DEFAULT = {
sentry: (config) => {
return {
dsn: process.env.SENTRY_DSN,
tracesSampleRate: parseFloat(process.env.SENTRY_SAMPLE_RATE),
};
},
};
```