
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
@sentry/opentelemetry-node
Advanced tools
This package allows you to send your NodeJS OpenTelemetry trace data to Sentry via OpenTelemetry SpanProcessors.
This SDK is considered experimental and in an alpha state. It may experience breaking changes. Please reach out on GitHub if you have any feedback/concerns.
npm install @sentry/node @sentry/opentelemetry-node
# Or yarn
yarn add @sentry/node @sentry/opentelemetry-node
Note that @sentry/opentelemetry-node
depends on the following peer dependencies:
@opentelemetry/api
version 1.0.0
or greater@opentelemetry/sdk-trace-base
version 1.0.0
or greater, or a package that implements that, like
@opentelemetry/sdk-node
.You need to register the SentrySpanProcessor
and SentryPropagator
with your OpenTelemetry installation:
const Sentry = require("@sentry/node");
const {
SentrySpanProcessor,
SentryPropagator,
} = require("@sentry/opentelemetry-node");
const opentelemetry = require("@opentelemetry/sdk-node");
const otelApi = require("@opentelemetry/api");
const {
getNodeAutoInstrumentations,
} = require("@opentelemetry/auto-instrumentations-node");
const {
OTLPTraceExporter,
} = require("@opentelemetry/exporter-trace-otlp-grpc");
// Make sure to call `Sentry.init` BEFORE initializing the OpenTelemetry SDK
Sentry.init({
dsn: '__DSN__',
tracesSampleRate: 1.0,
// set the instrumenter to use OpenTelemetry instead of Sentry
instrumenter: 'otel',
// ...
});
const sdk = new opentelemetry.NodeSDK({
// Existing config
traceExporter: new OTLPTraceExporter(),
instrumentations: [getNodeAutoInstrumentations()],
// Sentry config
spanProcessor: new SentrySpanProcessor(),
textMapPropagator: new SentryPropagator(),
});
sdk.start();
FAQs
Official Sentry SDK for OpenTelemetry Node.js
The npm package @sentry/opentelemetry-node receives a total of 32,270 weekly downloads. As such, @sentry/opentelemetry-node popularity was classified as popular.
We found that @sentry/opentelemetry-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.