Description
Problem Statement
@sentry/node
already supports much of the basic configuration via environment variables. These are great because you can change often change settings without re-deploying your code. However, users are still required to create a JavaScript file to call Sentry.init()
.
Solution Brainstorm
If we add an init
export (@sentry/node/init
) that calls Sentry.init()
users can then initialise Sentry and get all the auto-instrumentation magic without writing any code:
> SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 node --import=@sentry/node/init app.mjs