Packages

@sentry/node

11.9.0 · 23 Oct 2026MIT36.1M / weekRepositoryHomepagenpmAtom feed

Your version

10.48.0

9 Apr 2026Where it was published

10.77.1 is the newest release of 10.x.

In short

9 new6 fixed1 changed17 internal

Release note

Important Changes

  • aws-serverless: Ship Lambda extension in npm package for container image Lambdas

    The Sentry Lambda extension is now included in the npm package, enabling container image-based Lambda functions to use it. Copy the extension files into your Docker image and set the tunnel option:

    RUN mkdir -p /opt/sentry-extension
    COPY node_modules/@sentry/aws-serverless/build/lambda-extension/sentry-extension /opt/extensions/sentry-extension
    COPY node_modules/@sentry/aws-serverless/build/lambda-extension/index.mjs /opt/sentry-extension/index.mjs
    RUN chmod +x /opt/extensions/sentry-extension /opt/sentry-extension/index.mjs
    Sentry.init({
      dsn: '__DSN__',
      tunnel: 'http://localhost:9000/envelope',
    });

    This works with any Sentry SDK (@sentry/aws-serverless, @sentry/sveltekit, @sentry/node, etc.).

  • cloudflare: Support basic WorkerEntrypoint

    withSentry now supports instrumenting classes extending Cloudflare's WorkerEntrypoint. This instruments fetch, scheduled, queue, and tail handlers.

    import * as Sentry from '@sentry/cloudflare';
    import { WorkerEntrypoint } from 'cloudflare:workers';
    
    class MyWorker extends WorkerEntrypoint {
      async fetch(request: Request): Promise<Response> {
        return new Response('Hello World!');
      }
    }
    
    export default Sentry.withSentry(env => ({ dsn: env.SENTRY_DSN, tracesSampleRate: 1.0 }), MyWorker);
  • ref(core): Unify .do* span ops to gen_ai.generate_content (#20074)

    All Vercel AI do* spans (ai.generateText.doGenerate, ai.streamText.doStream, ai.generateObject.doGenerate, ai.streamObject.doStream) now use a single unified span op gen_ai.generate_content instead of separate ops like gen_ai.generate_text, gen_ai.stream_text, gen_ai.generate_object, and gen_ai.stream_object.

  • core: Support embeddings in LangChain

    Adds instrumentation for LangChain embeddings (embedQuery, embedDocuments), creating gen_ai.embeddings spans. In Node.js, embedding classes from @langchain/openai, @langchain/google-genai, @langchain/mistralai, and @langchain/google-vertexai are auto-instrumented. For other runtimes, use the new instrumentLangChainEmbeddings API:

    import * as Sentry from '@sentry/cloudflare';
    import { OpenAIEmbeddings } from '@langchain/openai';
    
    const embeddings = Sentry.instrumentLangChainEmbeddings(new OpenAIEmbeddings({ model: 'text-embedding-3-small' }));
    
    await embeddings.embedQuery('Hello world');

Other Changes

  • core: Support registerTool/registerResource/registerPrompt in MCP integration

  • core, node: Portable Express integration

  • deno: Add denoRuntimeMetricsIntegration

  • node, bun: Enforce minimum collection interval in runtime metrics integrations

  • nuxt: Exclude tracing meta tags on cached pages in Nuxt 5

  • react-router: Export sentryOnError

  • aws-serverless: Add timeout to _endSpan forceFlush to prevent Lambda hanging

  • cloudflare: Ensure every request instruments functions

  • core: Only attach flags context to error events

  • core: Replace regex with string check in stack parser to prevent main thread blocking

  • core: Set span.status to error when MCP tool returns JSON-RPC error response

  • gatsby: Fix errorHandler signature to match bundler-plugin-core API

Internal Changes