Skip to content

meta(changelog): Update changelog for 9.38.0 #16931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 11, 2025
Merged

Conversation

andreiborza
Copy link
Member

No description provided.

mydea and others added 11 commits July 10, 2025 16:15
…hod (#16890)

Related to #16846

This rewrites `timestampInSeconds` to avoid side effects.

As a part of this, I also streamlined this a bit to remove special
handling for missing `timeOrigin`. If that is missing, we just fall back
to using `dateTimestampInSeconds`, instead of doing some custom handling
of `timeOrigin` - IMHO that should not be any less accurate, as
otherwise we are currently mixing `performance.now` with `Date.now()`
which is likely not necessarily accurate either.
[Gitflow] Merge master into develop
Today the logger export from core has a side effect and reads from the global.

This PR rewrites this to instead only keep the enabled flag on the
carrier. The logger itself is a "normal" method that just looks at the
carrier to see if logging is enabled or not.
)

ref #16804

This was addressed with
#16806, but we didn't
guard every location that uses `entry.nextHopProtocol`.

Will backport to v9 after merge.

---------

Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
resolves #16903

ref #16901

This PR introduces a `debug` function that aims to replace `logger`.

This gives us a couple of benefits:
1. communicates intent of the export much better
1. avoids collision with `logger` exported from other sdks (which is
used for sentry structured logging)
1. we can move structured logging `logger` code into `@sentry/core`,
reducing duplication across our sdks

We don't deprecate `logger` just yet, we need to convert everything else
in the other SDKs first.
…te (#16866)

Refactor our CLS and LCP tracking and recording logic. We now
have a `listenForWebVitalReportEvents` helper function which listens to
page hides and navigation span starts and ensures that the standalone
span logic is only called once per web vital. Previously, we had this
logic in the CLS and LCP function and it was quite a lot of duplicated
and identical code.
Apart of directly vendored code, we should avoid `enum`, as it has
bundle size impact.

Also somehow part of
#16846
@andreiborza andreiborza requested a review from a team as a code owner July 11, 2025 10:55
CHANGELOG.md Outdated
### Other Changes

- feat(core): Introduce `debug` to replace `logger` ([#16906](https://github.com/getsentry/sentry-javascript/pull/16906))
- fix(browser): guard `nextHopProtocol` when adding resource spans ([#16900](https://github.com/getsentry/sentry-javascript/pull/16900))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l:

Suggested change
- fix(browser): guard `nextHopProtocol` when adding resource spans ([#16900](https://github.com/getsentry/sentry-javascript/pull/16900))
- fix(browser): Guard `nextHopProtocol` when adding resource spans ([#16900](https://github.com/getsentry/sentry-javascript/pull/16900))

cursor[bot]

This comment was marked as outdated.

@andreiborza andreiborza force-pushed the prepare-release/9.38.0 branch from 2076cdc to ccf61b2 Compare July 11, 2025 10:59
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Timestamp Function Fails to Use Performance API

The createUnixTimestampInSecondsFunc now incorrectly falls back to dateTimestampInSeconds in two scenarios:

  1. It no longer calculates an approximate timeOrigin when performance.timeOrigin is unavailable but performance.now() is present, instead falling back entirely to Date.now().
  2. The condition !performance.timeOrigin incorrectly triggers a fallback when performance.timeOrigin is 0 (a valid Unix epoch value), causing the function to use Date.now() even when the Performance API is fully available.

packages/core/src/utils/time.ts#L34-L42

const { performance } = GLOBAL_OBJ as typeof GLOBAL_OBJ & { performance?: Performance };
// Some browser and environments don't have a performance or timeOrigin, so we fallback to
// using Date.now() to compute the starting time.
if (!performance?.now || !performance.timeOrigin) {
return dateTimestampInSeconds;
}
const timeOrigin = performance.timeOrigin;

Fix in CursorFix in Web


Bug: Test Description Mismatch

The test description was updated to reference the debug field, but the assertion still checks someEvent.logger, creating an inconsistency.

packages/core/test/lib/integrations/captureconsole.test.ts#L127-L140

it('should add an event processor that sets the `debug` field of events', () => {
const captureConsole = captureConsoleIntegration({ levels: ['log'] });
captureConsole.setup?.(mockClient);
// call a wrapped function
GLOBAL_OBJ.console.log('some message');
expect(mockScope.addEventProcessor).toHaveBeenCalledTimes(1);
const addedEventProcessor = (mockScope.addEventProcessor as Mock).mock.calls[0]?.[0];
const someEvent: Event = {};
addedEventProcessor(someEvent);

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.88 kB added added
@sentry/browser - with treeshaking flags 22.35 kB added added
@sentry/browser (incl. Tracing) 39.75 kB added added
@sentry/browser (incl. Tracing, Replay) 77.88 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.7 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 82.57 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 94.68 kB added added
@sentry/browser (incl. Feedback) 40.57 kB added added
@sentry/browser (incl. sendFeedback) 28.56 kB added added
@sentry/browser (incl. FeedbackAsync) 33.46 kB added added
@sentry/react 25.61 kB added added
@sentry/react (incl. Tracing) 41.7 kB added added
@sentry/vue 28.31 kB added added
@sentry/vue (incl. Tracing) 41.54 kB added added
@sentry/svelte 23.9 kB added added
CDN Bundle 25.16 kB added added
CDN Bundle (incl. Tracing) 39.41 kB added added
CDN Bundle (incl. Tracing, Replay) 75.38 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 80.86 kB added added
CDN Bundle - uncompressed 73.5 kB added added
CDN Bundle (incl. Tracing) - uncompressed 116.89 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.06 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 243.88 kB added added
@sentry/nextjs (client) 43.34 kB added added
@sentry/sveltekit (client) 40.2 kB added added
@sentry/node 167.57 kB added added
@sentry/node - without tracing 100.3 kB added added
@sentry/aws-serverless 128.41 kB added added

@andreiborza andreiborza merged commit 708c73e into master Jul 11, 2025
165 checks passed
@andreiborza andreiborza deleted the prepare-release/9.38.0 branch July 11, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants