Requested by: @Lms24
Merge target: master
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
Important Changes
-
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');
Other Changes
- feat(core): Support registerTool/registerResource/registerPrompt in MCP integration (#20071)
- feat(core, node): Portable Express integration (#19928)
- feat(deno): Add
denoRuntimeMetricsIntegration (#20023)
- feat(deps): Bump bundler plugins to
5.2.0 (#20122)
- feat(deps): bump @hapi/content from 6.0.0 to 6.0.1 (#20102)
- feat(node, bun): Enforce minimum collection interval in runtime metrics integrations (#20068)
- feat(nuxt): Exclude tracing meta tags on cached pages in Nuxt 5 (#20168)
- feat(react-router): Export
sentryOnError (#20120)
- fix(aws-serverless): Add timeout to _endSpan forceFlush to prevent Lambda hanging (#20064)
- fix(cloudflare): Ensure every request instruments functions (#20044)
- fix(core): Only attach
flags context to error events (#20116)
- fix(core): Replace regex with string check in stack parser to prevent main thread blocking (#20089)
- fix(core): set span.status to error when MCP tool returns JSON-RPC error response (#20082)
- fix(gatsby): Fix errorHandler signature to match bundler-plugin-core API (#20048)
- ref(core): Do not emit spans for chats.create in google-genai (#19990)
Internal Changes
- chore: Remove unused
tsconfig-template folder (#20067)
- chore: Update validate-pr workflow (#20072)
- chore(deps-dev): Bump effect from 3.20.0 to 3.21.0 (#19999)
- chore(deps): Bump @xmldom/xmldom from 0.8.3 to 0.8.12 (#20066)
- chore(deps): Bump lodash.template from 4.5.0 to 4.18.1 (#20085)
- chore(oxlint): Add typeawareness into oxlintrc (#20075)
- ci(deps): Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.24.1 to 2.25.2 (#20081)
- ci(deps): Bump
mshick/add-pr-comment (#20078)
- ref(core): Extract shared endStreamSpan for AI integrations (#20021)
- ref(core): Simplify addResponseAttributes in openai integration (#20013)
- test(angular): Bump TypeScript to ~6.0.0 in angular-21 E2E test app (#20134)
- test(nuxt): Make Nuxt 5 (nightly) E2E optional (#20113)
- tests(node): Add node integration tests for Vercel
ToolLoopAgent (#20087)
Requested by: @Lms24
Merge target: master
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
Important Changes
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
tunneloption:This works with any Sentry SDK (
@sentry/aws-serverless,@sentry/sveltekit,@sentry/node, etc.).feat(cloudflare): Support basic WorkerEntrypoint (#19884)
withSentrynow supports instrumenting classes extending Cloudflare'sWorkerEntrypoint. This instrumentsfetch,scheduled,queue, andtailhandlers.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 opgen_ai.generate_contentinstead of separate ops likegen_ai.generate_text,gen_ai.stream_text,gen_ai.generate_object, andgen_ai.stream_object.ref(core): Remove provider-specific AI span attributes in favor of
gen_aiattributes 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:openai.response.idgen_ai.response.idopenai.response.modelgen_ai.response.modelopenai.usage.prompt_tokensgen_ai.usage.input_tokensopenai.usage.completion_tokensgen_ai.usage.output_tokensopenai.response.timestampanthropic.response.timestampIf you reference these attributes in hooks (e.g.
beforeSendTransaction), update them to thegen_ai.*equivalents.feat(core): Support embeddings in LangChain (#20017)
Adds instrumentation for LangChain embeddings (
embedQuery,embedDocuments), creatinggen_ai.embeddingsspans. In Node.js, embedding classes from@langchain/openai,@langchain/google-genai,@langchain/mistralai, and@langchain/google-vertexaiare auto-instrumented. For other runtimes, use the newinstrumentLangChainEmbeddingsAPI:Other Changes
denoRuntimeMetricsIntegration(#20023)5.2.0(#20122)sentryOnError(#20120)flagscontext to error events (#20116)Internal Changes
tsconfig-templatefolder (#20067)mshick/add-pr-comment(#20078)ToolLoopAgent(#20087)