Official Sentry SDKs for JavaScript
Repo getsentry/sentry-javascript, read from GitHub 14 h ago. getsentry has not joined Take My Repo.
docs(tanstackstart-react): Promote SDK status to stable (#26691)
This release promotes the @sentry/tanstackstart-react SDK to stable. It supports @tanstack/react-start 1.169.0 and newer. For details on how to use it, check out the
Sentry TanStack Start SDK docs.
feat(solid): Add Solid 2 support (alpha)
@sentry/solid now ships alpha support for Solid 2 under the @sentry/solid/solid2 entry point. It captures errors on the client and the server, traces navigations with Solid Router 2 via @sentry/solid/solid2/solidrouter, names server spans after the matched route, and continues the server trace in the browser pageload. The Solid 1 entry points are unchanged. The APIs of the Solid 2 entry may still change in minor releases while it is in alpha.
httpIntegration incoming-request options to node:http servers (#26611)| Path | Size |
|---|---|
| @sentry/browser | 29.52 KB |
| @sentry/browser - with treeshaking flags | 27.76 KB |
| @sentry/browser - with treeshaking flags tracing without tracing | 27.67 KB |
| @sentry/browser (incl. Tracing) | 51.57 KB |
| @sentry/browser (incl. Tracing Core) | 39.38 KB |
| @sentry/browser (incl. Tracing + Span Streaming) | 51.57 KB |
| @sentry/browser (incl. Tracing, Profiling) | 54.39 KB |
| @sentry/browser (incl. Tracing, Replay) | 90.68 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 79.76 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 94.95 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 108.18 KB |
| @sentry/browser (incl. Feedback) | 47.04 KB |
| @sentry/browser (incl. sendFeedback) | 30.09 KB |
| @sentry/browser (incl. FeedbackAsync) | 35 KB |
| @sentry/browser (incl. Metrics) | 30.81 KB |
| @sentry/browser (incl. Logs) | 31.08 KB |
| @sentry/browser (incl. Metrics & Logs) | 31.73 KB |
| @sentry/react | 31.48 KB |
| @sentry/react (incl. Tracing) | 54.15 KB |
| @sentry/vue | 37.55 KB |
| @sentry/vue (incl. Tracing) | 54.45 KB |
| @sentry/svelte | 29.53 KB |
| @sentry/remix (Remix 3 client bundle) | 57.09 KB |
| CDN Bundle | 31.41 KB |
| CDN Bundle (incl. Tracing) | 51.94 KB |
| CDN Bundle (incl. Logs, Metrics) | 34.13 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) | 54.45 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) | 74.2 KB |
| CDN Bundle (incl. Tracing, Replay) | 88.94 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) | 91.49 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 94.22 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) | 96.72 KB |
| CDN Bundle - uncompressed | 91.71 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 153.57 KB |
| CDN Bundle (incl. Logs, Metrics) - uncompressed | 99.85 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed | 161.02 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed | 226.91 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 270.91 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed | 278.36 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 282.56 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed | 290 KB |
| @sentry/nextjs (client) | 57.76 KB |
| @sentry/sveltekit (client) | 52.79 KB |
| @sentry/core/server | 44.22 KB |
| @sentry/core/browser | 14.08 KB |
| @sentry/node | 150.4 KB |
| @sentry/node/import (ESM hook with diagnostics-channel injection) | 81.38 KB |
| @sentry/node - without tracing | 86.73 KB |
| @sentry/node - without channel injection | 139.63 KB |
| @sentry/aws-serverless | 97.08 KB |
| @sentry/cloudflare (withSentry) - minified | 203.62 KB |
| @sentry/cloudflare (withSentry) | 472.54 KB |
| @sentry/cloudflare (withSentry, instrumented CommonJS package) - minified | 995.89 KB |
| @sentry/nextjs/cloudflare (withSentry) - minified | 228.26 KB |
feat(core): Continue MCP server traces from params._meta (#26308)
MCP server spans now continue the caller's trace from the sentry-trace and baggage keys in a request's or notification's params._meta, so they connect to the agent that called the tool, including over stdio. Set propagateTraceparent: true to also continue from a W3C traceparent key. On Streamable HTTP, the MCP span is no longer a child of the http.server span when the client sends trace context in _meta. It has a span link to that span instead. Messages without valid trace context in _meta, or with trace context from another Sentry org, still join the transport's trace.
ref(tanstackstart-react): Use code.file.path on server function spans (#26495)
Server function spans now set the file of the server function in code.file.path instead of tanstackstart.function.filename. The tanstackstart.function.id attribute is removed.
sentry-release meta tag (#26514)bun run on Bun 1.4.6 and later (#26515)sourcemaps.upload, injectDebugIds and delete (#26571)resolveReleaseName (#26500)sourcemaps.upload, injectDebugIds and delete to the shared build options (#26576)sourcemaps.upload, injectDebugIds and delete (#26606)release.inject: 'html' to keep chunk hashes stable (#26511)release.inject: 'html' to keep chunk hashes stable (#26512)bun run (#26622)release.inject: false (#26509)release.inject (#26499)Work in this release was contributed by @psang39. Thank you for your contribution!
| Path | Size |
|---|---|
| @sentry/browser | 29.52 KB |
| @sentry/browser - with treeshaking flags | 27.76 KB |
| @sentry/browser - with treeshaking flags tracing without tracing | 27.67 KB |
| @sentry/browser (incl. Tracing) | 51.55 KB |
| @sentry/browser (incl. Tracing Core) | 39.37 KB |
| @sentry/browser (incl. Tracing + Span Streaming) | 51.56 KB |
| @sentry/browser (incl. Tracing, Profiling) | 54.37 KB |
| @sentry/browser (incl. Tracing, Replay) | 90.66 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 79.74 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 94.94 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 108.17 KB |
| @sentry/browser (incl. Feedback) | 47.04 KB |
| @sentry/browser (incl. sendFeedback) | 30.09 KB |
| @sentry/browser (incl. FeedbackAsync) | 35 KB |
| @sentry/browser (incl. Metrics) | 30.81 KB |
| @sentry/browser (incl. Logs) | 31.08 KB |
| @sentry/browser (incl. Metrics & Logs) | 31.73 KB |
| @sentry/react | 31.48 KB |
| @sentry/react (incl. Tracing) | 54.14 KB |
| @sentry/vue | 37.54 KB |
| @sentry/vue (incl. Tracing) | 54.44 KB |
| @sentry/svelte | 29.53 KB |
| @sentry/remix (Remix 3 client bundle) | 57.08 KB |
| CDN Bundle | 31.41 KB |
| CDN Bundle (incl. Tracing) | 51.93 KB |
feat(browser): Add browserTracingCoreIntegration and standalone tracing integrations (#26259, #26260, #26261, #26262, #26273, #26276, #26497)
browserTracingIntegration now sets up fetch and XHR request spans, linked traces, long tasks and resource spans through the standalone fetchTracingIntegration, xhrTracingIntegration, linkedTracesIntegration, longTasksIntegration and resourcesIntegration. Its behavior is unchanged. To ship less code, use browserTracingCoreIntegration, which keeps pageload and navigation spans, and add only the standalone integrations you need. The CDN bundles export them too.
ref(server-utils): Share one cron converter across cron integrations (#25918)
Sentry.cron.instrumentCron, instrumentNodeCron and instrumentNodeSchedule send the server's time zone when a job has none, so monitors don't report false misses on servers that aren't on UTC. Schedules Sentry can't express exactly, such as per-second schedules, send no monitor config, so the monitor keeps the schedule set in Sentry. Sentry.cron.instrumentNodeCron is deprecated; use nodeCronIntegration instead.
fix(nuxt): Name the database system in db.system.name of db0 spans (#26285)
Nitro database (db0) spans now set db.system.name to the database system of the connector's dialect (mysql, postgresql, sqlite or libsql), as the OpenTelemetry conventions define it, instead of the connector name. For example, spans of the mysql2 and planetscale connectors now report mysql, and spans of better-sqlite3 and cloudflare-d1 now report sqlite. Update saved queries, alerts and dashboards that filter on the connector names.
cacheClient option (#26494)JSON.stringify output that goes into generated code (#26314)Work in this release was contributed by @JavierCane. Thank you for your contribution!
| Path | Size |
|---|---|
| @sentry/browser | 29.47 KB |
| @sentry/browser - with treeshaking flags | 27.71 KB |
| @sentry/browser - with treeshaking flags tracing without tracing | 27.62 KB |
| @sentry/browser (incl. Tracing) | 51.5 KB |
| @sentry/browser (incl. Tracing Core) | 39.32 KB |
| @sentry/browser (incl. Tracing + Span Streaming) | 51.51 KB |
| @sentry/browser (incl. Tracing, Profiling) | 54.32 KB |
| @sentry/browser (incl. Tracing, Replay) | 90.61 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 79.69 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 94.88 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 107.8 KB |
| @sentry/browser (incl. Feedback) | 46.68 KB |
| @sentry/browser (incl. sendFeedback) | 30.04 KB |
| @sentry/browser (incl. FeedbackAsync) | 34.92 KB |
| @sentry/browser (incl. Metrics) | 30.76 KB |
| @sentry/browser (incl. Logs) | 31.03 KB |
| @sentry/browser (incl. Metrics & Logs) | 31.68 KB |
| @sentry/react | 31.44 KB |
| @sentry/react (incl. Tracing) | 54.09 KB |
| @sentry/vue | 37.48 KB |
| @sentry/vue (incl. Tracing) | 54.38 KB |
| @sentry/svelte | 29.49 KB |
| @sentry/remix (Remix 3 client bundle) | 57.03 KB |
| CDN Bundle | 31.35 KB |
| CDN Bundle (incl. Tracing) | 51.9 KB |
| CDN Bundle (incl. Logs, Metrics) | 34.07 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) | 54.41 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) | 74.14 KB |
| CDN Bundle (incl. Tracing, Replay) | 88.9 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) | 91.45 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 94.16 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) | 96.66 KB |
| CDN Bundle - uncompressed | 91.6 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 153.44 KB |
| CDN Bundle (incl. Logs, Metrics) - uncompressed | 99.74 KB |
| CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed | 160.89 KB |
| CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed | 226.81 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 270.78 KB |
| CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed | 278.23 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 282.3 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed | 289.74 KB |
| @sentry/nextjs (client) | 57.63 KB |
| @sentry/sveltekit (client) | 52.76 KB |
| @sentry/core/server | 43.75 KB |
| @sentry/core/browser | 14.07 KB |
| @sentry/node | 148.18 KB |
| @sentry/node/import (ESM hook with diagnostics-channel injection) | 81.38 KB |
| @sentry/node - without tracing | 86.59 KB |
| @sentry/node - without channel injection | 137.4 KB |
| @sentry/aws-serverless | 96.72 KB |
| @sentry/cloudflare (withSentry) - minified | 202.1 KB |
| @sentry/cloudflare (withSentry) | 469.11 KB |
| @sentry/nextjs/cloudflare (withSentry) - minified | 226.86 KB |
feat(sveltekit): Mark pageloads of prerendered and Vercel ISR pages (#26301, #26307)
When SvelteKit serves a page that it rendered earlier, the pageload now has the page.server_rendering.type: static attribute. This covers pages prerendered during vite build and pages that Vercel caches with ISR (config.isr). For an ISR page, the pageload also links to the request that rendered the page, if that request was sampled.
Before, every visitor of a cached ISR page continued the trace of that one request. Now each pageload starts its own trace. Pages with ssr = false get no attribute, because the server rendered none of their content.
feat(nuxt): Mark pageloads of cached pages (#26305)
When Nuxt serves a cached or prerendered page, for example with a swr or isr route rule, the pageload now has the page.server_rendering.type: static attribute and starts its own trace. If the request that rendered the cached page was sampled, the pageload also links to it. So visitors of a cached page no longer continue the trace of the request that rendered it.
fix(core): Set url.scheme without colon and url.port as a number (#26284)
HTTP spans that the SDK builds from a URL now send url.scheme without the trailing colon (https instead of https:) and url.port as a number instead of a string, as the Sentry conventions define them and as Node http.server spans already do. This changes http.server spans from @sentry/cloudflare, Bun.serve, Deno and Nitro, and outgoing node:http client spans. Update saved queries, alerts and dashboards that filter on url.scheme:"https:" or on url.port as a string.
feat(cloudflare): Continue the Cloudflare trace of the invocation (#25613)
When tracing is not set up (no tracesSampleRate or tracesSampler), errors and logs from fetch, scheduled, queue and email handlers and from WorkerEntrypoint RPC methods now get the trace id that Cloudflare gives the invocation. With this trace id, you can find the Cloudflare spans and logs of an error in Workers Observability. This needs workerd 1.20261009.1 or newer and Workers Observability turned on. An incoming Sentry trace still has precedence.
The parent_span_id of these events is the id of a Cloudflare span. This span is in Sentry only when you export your Workers traces to Sentry.
feat(server-utils): Record Bedrock prompts and responses (#26249, #26362, #26414)
Amazon Bedrock spans from awsIntegration now record prompts, system instructions, tool definitions and responses by default, as the other AI integrations do. This applies to the Converse, ConverseStream, InvokeModel and InvokeModelWithResponseStream commands.
To stop recording prompts or responses for all AI integrations, set dataCollection: { genAI: { inputs: false, outputs: false } }. To stop it only for Bedrock, use the new awsIntegration options, which take precedence over dataCollection.genAI:
Sentry.init({ integrations: [Sentry.awsIntegration({ recordInputs: false, recordOutputs: false })], });
deleteSourcemapsAfterUpload: true when no upload runs (#26281)trace and tailStream handlers (#26250)getTraceServerTimingHeader and isSharedCacheable (#26325)Server-Timing header of document responses (#26107)@sentry/node startup time (#25968)BrowserClient constructor (#26313)application/x-sentry-envelope (#26299)url to sentry.io (#26252)@flue/runtime provide its own namespace (#25935)_enhanceErrorWithSentryInfo (#26349)@sentry/conventions to 0.33.0 (#26374)node-abort-controller deprecation in the lockfile (#26270)enableLongAnimationFrame default in JSDoc (#26256)feat(bundler-plugins): Enable hidden source maps and remove them after upload (#25637, #25645, #25646, #25647, #25648)
The Sentry Rollup, Vite, webpack and esbuild plugins now turn on hidden source maps when your bundler has no source maps enabled and the plugin can upload them. They upload the maps to Sentry and remove them from the build output. You no longer need to set sourcemap: 'hidden' or filesToDeleteAfterUpload globs:
sentryVitePlugin({ org, project, authToken });
The new sourcemaps.deleteSourcemapsAfterUpload option controls the removal:
true: the plugin also removes source maps you enabled yourself, and switches visible source maps to hidden. Set this if you already use sourcemap: 'hidden' and want to drop your filesToDeleteAfterUpload globs.false: the plugin never removes source maps.Builds in development mode or without an auth token, org and project do not change.
feat(cloudflare): Propagate tracing context through Queue messages (#25306)
Cloudflare Queue consumers can now link to the traces of the producers that sent the messages. Set queueTracePropagationBindings to the producer bindings that should add trace data to plain-object message bodies. Consumers remove this data before your handler runs, and the queue.process span links to every producer in the batch.
export default Sentry.withSentry( env => ({ dsn: env.SENTRY_DSN, queueTracePropagationBindings: ['BILLING_QUEUE', /^JOBS_/], }), handler, );
feat(core): Answer managed tunnel requests in the runtime (#25997, #25998, #25999, #26000, #26001)
serveTunnelIntegration() now answers tunnel requests before they reach your app, in Node.js, Bun, Deno, Cloudflare Workers and AWS Lambda. You no longer need a framework integration or a route handler, so any server setup works with only the integration:
Sentry.init({ dsn, integrations: [Sentry.serveTunnelIntegration()] });
To answer tunnel requests from your own code, set serveTunnelIntegration({ intercept: false }) and call handleTunnelRequestIfMatched.
tunnelRoute (#26225)// paths in url.full (#26165)@sentry/conventions to 0.31.0 (#26160)@sentry/conventions to 0.32.0 (#26222)node:fs for removal scripts (#26219)sourcemaps.assets and sourcemaps.ignore (#25916)Work in this release was contributed by @lazerg, @rjmcgee53192, @adityankale190895, @arthurfiorette, @chan-mai, @nuntz, and @43081j. Thank you for your contributions!
| Path | Size |
|---|---|
| @sentry/browser | 29.22 KB |
| @sentry/browser - with treeshaking flags | 27.42 KB |
| @sentry/browser - with treeshaking flags tracing without tracing | 27.32 KB |
| @sentry/browser (incl. Tracing) | 51.07 KB |
| @sentry/browser (incl. Tracing + Span Streaming) | 51.08 KB |
| @sentry/browser (incl. Tracing, Profiling) | 53.98 KB |
| @sentry/browser (incl. Tracing, Replay) | 90.52 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 79.46 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 95.15 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 107.83 KB |
| @sentry/browser (incl. Feedback) | 46.41 KB |
| @sentry/browser (incl. sendFeedback) | 34.19 KB |
| @sentry/browser (incl. FeedbackAsync) | 39.19 KB |
| @sentry/browser (incl. Metrics) | 30.75 KB |
| @sentry/browser (incl. Logs) | 31.03 KB |
| @sentry/browser (incl. Metrics & Logs) | 31.69 KB |
| @sentry/react | 31.03 KB |
| @sentry/react (incl. Tracing) | 53.48 KB |
| @sentry/vue | 37.44 KB |
ref(cloudflare): Use the shared request handler wrapper (#25588)
Cloudflare Workers now use the same request handler wrapper as Deno.serve and Bun.serve. Changes for Cloudflare users:
client.address from the CF-Connecting-IP header (or another forwarding header), as on the other runtimes. This follows dataCollection.userInfo, which is true by default. To leave it out, set dataCollection: { userInfo: false }.response context with the status code.captureErrors: false, it does not capture it.Set-Cookie header of a response, as on Deno and Bun.AsyncLocalStorage (for example on Shopify Oxygen), events now also get the request URL and method.feat(nestjs): Add an option to monitor every @Cron method (#25471)
Set monitorCronJobs: true on nestIntegration() to send check-ins for every @Cron() method, without adding @SentryCron to each one. It's off by default. Each monitored job creates a monitor in Sentry, and monitors are billed. Use excludeCronJobs to skip jobs by slug. Methods that also have @SentryCron check in once, with the slug and options passed to @SentryCron.
feat(node): Add cronJobIntegration to monitor cron jobs (#25477)
Add Sentry.cronJobIntegration() to integrations to send check-ins for every named CronJob of the cron package (4.3+), with the job name as the monitor slug. It's off by default. Each monitored job creates a monitor in Sentry, and monitors are billed. Use excludeJobs to skip jobs by name. Sentry.cron.instrumentCron is deprecated; use cronJobIntegration instead.
fix(server-utils): Instrument @anthropic-ai/sdk 1.x and turn off its own OTel spans (#25750)
The Anthropic integration now instruments @anthropic-ai/sdk 1.x. Since 0.134 the SDK also records its own OpenTelemetry spans, such as anthropic.messages.create, which duplicated Sentry's gen_ai spans. Once Sentry instruments the SDK, it sets ANTHROPIC_OPEN_TELEMETRY=false to turn those spans off. To keep them, set ANTHROPIC_OPEN_TELEMETRY=true or pass the openTelemetry option to the Anthropic client.
feat(nextjs): Mark pageloads of cached pages (#25318)
When Next.js serves a page from its cache, for example an ISR page or a cacheComponents shell, the pageload now has the page.server_rendering.type attribute. It is static if the whole page came from the cache, and partially_static if parts of it rendered for this request. Then the pageload stays connected to this request, as before. If the request that rendered the cached page was sampled, the pageload also links to it. So in Sentry, a cached page no longer looks like missing server instrumentation.
@sentry/astro/integration entry for the Astro integration (#25726)sourcemaps.deleteSourcemapsAfterUpload and staged uploads (#25637)applicationKeyExcludeDependencies option (#25818)awsLambdaWebIntegration for Lambda Web Functions (#25355)getSqlSpanName for SQL span names (#25929)getSqlQueryAttributes helper for consistency (#25927)db.operation.name on SQL spans (#25850)withSentry from @sentry/solidstart/vite (#25725)handleTunnelRequest form and reword the serveTunnelIntegration docs (#25844)canaryVariants (#25866)