meta(changelog): Update changelog for 10.62.0#21792
Conversation
A couple of changes: - add a `sentry-sdk-pre-init-duration` measure to see how long the entire page load takes _until_ we start initializing the SDK. - add 3 new modes: - `tracing-lazy-import`: Purely for testing if importing browserTracingIntegration has a net positive or negative effect compared to eagerly registering it in the `tracing` mode - `minimal-integrations`: Errors only with minimal intesgrations - `no-breadcrumbs`: Removes breadcrumbs from the mix. It's the other integration that does a lot of patching, so I wanna see how much it contributes - add an element timing tag for the logo.svg which I hope to pick up in sentry-lighthouse. I want to have something more deterministic than LCP
Streamlines the AWS Lambda instrumentation: - Folds the `requestHook` (origin/op) and `responseHook` (error capture) into the instrumentation, removing the hook config. - Uses `startInactiveSpan`/`withActiveSpan` from `@sentry/core` instead of the OTel tracer (span kind preserved via the `kind` option). - Uses `continueTrace` from `@sentry/core` for incoming trace propagation instead of the OTel propagation primitives (`propagation.extract`/`context.with`). - Removes unused code: the internal `eventContextExtractor` config and default extractor, `internal-types.ts` (inlines `LambdaModule`), and the dead `disableAwsContextPropagation` default (option deprecated for v11 removal). - Moves OTel `diag` logging to Sentry's `debug`. - Adds callback-style and trace-propagation integration tests. Closes #21746 --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[Gitflow] Merge master into develop
#21783) Since tracingChannel is not available before node 18.19., this would fail at runtime. Instead, this can check at runtime if it exists and simply avoid using it on older versions.
New theory: `browserSessionIntegration` captures and sends a session right within `setupOnce`. I could see this causing overhead, given we send out an envelope. Let's see if this is it. Deferring the session capturing (`requestIdleTimeout` or similar) should be fairly easy and safe
As reported in #21775 we'd catch client-side 400 errors for server responses coming from pre-loaded (e.g. on hover loading) server responses. The 4xx error detection logic adjusment, as well as the test are courtesy of [hyunbinseo](https://github.com/hyunbinseo), who suggested these changes in the issue. Thanks for figuring this out! I'm merely the messenger and initial reviewer here :) closes #21775 --------- Co-authored-by: hyunbinseo <47051820+hyunbinseo@users.noreply.github.com>
In the latest beta release of v7 of the ai package, native tracing channel events are now emitted. This PR adds support for this and thus for instrumentation in this package. For now, this is only implemented in node, but can also be ported to deno/bun. A big part of this PR was making sure that the v6 tests also run for v7 to make sure this is compatible. It may need some cleanup but tests pass now. The tests are identical for v6 and v7 (just fixed some formatting stuff, moved folder, added a describe.each to run it multiple times), git just could not fully keep up with the changes so it appears bigger than it is. Supersedes #21584
a621535 to
31fac4b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 31fac4b. Configure here.
size-limit report 📦
|
The package names have changed so we need to update some existing excluded packages. Also added some runtimes and platforms to the sources.
Revert the change adding vercelAi v7 to cloudflare because this could lead to problems.
31fac4b to
24a346a
Compare
|
|
||
| import type { IntegrationFn } from '@sentry/core'; | ||
| import { addVercelAiProcessors, defineIntegration } from '@sentry/core'; | ||
| import { vercelAiIntegration as serverUtilsVercelAiIntegration } from '@sentry/server-utils'; |
There was a problem hiding this comment.
Bug: The Deno vercelAIIntegration incorrectly combines v6 OTel processors and v7 tracing channel subscriptions, leading to double instrumentation for users of the ai v7 library.
Severity: HIGH
Suggested Fix
The Deno vercelAIIntegration should not spread the result of serverUtilsVercelAiIntegration. Instead, it should explicitly use only the necessary parts, or conditionally choose between the v6 and v7 instrumentation paths. The simplest fix is to remove the spread ...inner and only define the setup method for the v6 path, mirroring the Cloudflare integration's behavior.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: packages/deno/src/integrations/tracing/vercelai.ts#L7
Potential issue: The Deno `vercelAIIntegration` was intended to copy the Cloudflare
SDK's v6-only OTel instrumentation. However, by spreading the result of
`serverUtilsVercelAiIntegration`, it inadvertently includes the `setupOnce` method from
`@sentry/server-utils`. This method activates the v7 tracing channel
(`node:diagnostics_channel`) path. Simultaneously, the integration's own `setup` method
registers v6 OTel processors via `addVercelAiProcessors`. For Deno users on version
1.44.3+ with the `ai` v7 library, both instrumentation paths will execute, resulting in
double instrumentation and duplicate spans in traces.
Also affects:
packages/deno/src/integrations/tracing/vercelai.ts:17~26packages/server-utils/src/vercel-ai/index.ts:3~3
Did we get this right? 👍 / 👎 to inform future reviews.
24a346a to
664bea7
Compare
Streamlines the firebase instrumentation: - Folds attributes set via hooks into the instrumentation. - Use startSpan APIs from `@sentry/core`. - Remove code paths e.g. configs. - No tests added since this should be sufficiently covered already. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Streamlines the amqplib instrumentation: - Folds attributes set via hooks (e.g. origin) into the instrumentation. - Use `startSpan` APIs from `@sentry/core` instead of the OTel tracer. - Remove unused code paths e.g. configs, hooks, dual semconv emission. - Replace the OTel context-key confirm-channel guard with a synchronous instance flag. - Removes the `/* eslint-disable */` from the vendored files so they pass the linter. - Adds consumer-reject and confirm-channel integration tests to lock down the streamlined paths. Closes #20723 Linear: https://linear.app/getsentry/issue/JS-2375/streamline-opentelemetryinstrumentation-amqplib
664bea7 to
f36645c
Compare

Prepare release 10.62.0.