@sentry/node-experimental v7.114.0
Official Sentry SDK for Node (EXPERIMENTAL)
This is a WIP, proof of concept implementation of a Node SDK that uses OpenTelemetry for performance instrumentation under the hood.
THIS MAY/WILL BREAK IN MANY UNEXPECTED WAYS. We may remove, add, change any of the integrations, add/remove any exports, etc. This package is NOT READY TO USE IN ANY FORM OF PRODUCTION ENVIRONMENT!
This SDK is considered experimental and in an alpha state. It may experience breaking changes, and may be discontinued at any time. Please reach out on GitHub if you have any feedback/concerns.
Installation
npm install @sentry/node-experimental
# Or yarn
yarn add @sentry/node-experimental
Usage
// ES5 Syntax
const Sentry = require('@sentry/node-experimental');
// ES6 Syntax
import * as Sentry from '@sentry/node-experimental';
Sentry.init({
dsn: '__DSN__',
// ...
});
Note that it is necessary to initialize Sentry before you import any package that may be instrumented by us.
Status of this Experiment
Currently, this SDK:
- Will capture errors (same as @sentry/node)
- Auto-instrument for performance - see below for which performance integrations are available.
Manual Instrumentation
Manual instrumentation is not supported!
This is because the current Sentry-Performance-APIs like Sentry.startTransaction()
are not compatible with the OpenTelemetry tracing model.
We may add manual tracing capabilities in a later version.
ESM Support
Due to the way OpenTelemetry handles instrumentation, this only works out of the box for CommonJS (require
) applications.
There is experimental support for running OpenTelemetry with ESM ("type": "module"
):
node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ./app.js
See OpenTelemetry Instrumentation Docs for details on this - but note that this is a) experimental, and b) does not work with all integrations.
Available (Performance) Integrations
- Http
- Express
- Fastify
- Nest
- Mysql
- Mysql2
- GraphQL
- Mongo
- Mongoose
- Postgres
- Prisma
All of these are auto-discovered, you don't need to configure anything for performance.
You still need to register middlewares etc. for error capturing.
Other, non-performance integrations from @sentry/node
are also available (except for Undici).
Links
8 months ago
8 months ago
12 months ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago