feat(aws-serverless): Ship Lambda extension in npm package for container image Lambdas (#20133)
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.).
feat(cloudflare): Support basic WorkerEntrypoint (#19884)
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.
ref(core): Remove provider-specific AI span attributes in favor of gen_ai attributes in sentry conventions (#20011)
The following provider-specific span attributes have been removed from the OpenAI and Anthropic AI integrations. Use the standardized gen_ai.* equivalents instead:
| Removed attribute | Replacement |
|---|---|
openai.response.id | gen_ai.response.id |
openai.response.model | gen_ai.response.model |
openai.usage.prompt_tokens | gen_ai.usage.input_tokens |
openai.usage.completion_tokens | gen_ai.usage.output_tokens |
openai.response.timestamp | (removed, no replacement) |
anthropic.response.timestamp | (removed, no replacement) |
If you reference these attributes in hooks (e.g. beforeSendTransaction), update them to the gen_ai.* equivalents.
feat(core): Support embeddings in LangChain (#20017)
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');
denoRuntimeMetricsIntegration (#20023)5.2.0 (#20122)sentryOnError (#20120)flags context to error events (#20116)tsconfig-template folder (#20067)mshick/add-pr-comment (#20078)ToolLoopAgent (#20087)| Path | Size |
|---|---|
| @sentry/browser | 25.12 KB |
| @sentry/browser - with treeshaking flags | 23.65 KB |
| @sentry/browser (incl. Tracing) | 41.7 KB |
| @sentry/browser (incl. Tracing, Profiling) | 46.21 KB |
| @sentry/browser (incl. Tracing, Replay) | 79.6 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 69.42 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 84.2 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 96.12 KB |
| @sentry/browser (incl. Feedback) | 41.51 KB |
| @sentry/browser (incl. sendFeedback) | 29.67 KB |
| @sentry/browser (incl. FeedbackAsync) | 34.55 KB |
| @sentry/browser (incl. Metrics) | 26.4 KB |
| @sentry/browser (incl. Logs) | 26.55 KB |
| @sentry/browser (incl. Metrics & Logs) | 27.2 KB |
| @sentry/react | 26.84 KB |
| @sentry/react (incl. Tracing) | 43.96 KB |
| @sentry/vue | 29.84 KB |
| @sentry/vue (incl. Tracing) | 43.51 KB |
| @sentry/svelte | 25.14 KB |
| CDN Bundle | 27.74 KB |
| CDN Bundle (incl. Tracing) | 42.69 KB |
| CDN Bundle (incl. Logs, Metrics) | 29.09 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) | 43.75 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) | 66.99 KB |
| CDN Bundle (incl. Tracing, Replay) | 78.71 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) | 79.71 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 84.12 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) | 85.13 KB |
| CDN Bundle - uncompressed | 81.05 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 126.6 KB |
| CDN Bundle (incl. Logs, Metrics) - uncompressed | 85.1 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed | 129.93 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed | 205.2 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 240.74 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed | 244.06 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 253.35 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed | 256.66 KB |
| @sentry/nextjs (client) | 46.33 KB |
| @sentry/sveltekit (client) | 42.15 KB |
| @sentry/node-core | 56.5 KB |
| @sentry/node | 170.69 KB |
| @sentry/node - without tracing | 95.65 KB |
| @sentry/aws-serverless | 112.5 KB |
Fetched April 9, 2026