@elysiumjs/plugin-sentry
v0.5.5
Published
Sentry error reporting plugin for the Elysium.js framework.
Maintainers
Readme
@elysiumjs/plugin-sentry
Enables Sentry error reporting for Elysium applications.
Installation
bun add @elysiumjs/plugin-sentryUsage
Add SentryModule to your application:
import { Application } from '@elysiumjs/olympus';
import { SentryModule } from '@elysiumjs/plugin-sentry';
@Application.register({
modules: [
SentryModule.with({
serverName: 'my-app',
dsn: 'https://<key>@sentry.io/<project>'
})
// Your other modules
]
})
class MyApp extends Application {}The dsn can also come from the SENTRY_DSN environment variable. Boot fails when neither is set.
The module declares SENTRY_DSN and SENTRY_ENVIRONMENT in its environment schema, so both are validated at boot and typed in Env.get().
Configuration
The module forwards all options to the Sentry initialization method. You can find the full list of options here.
License
This project is licensed under the terms of the Apache License 2.0.
