meta(changelog): Update changelog for 9.38.0#16931
Merged
andreiborza merged 12 commits intomasterfrom Jul 11, 2025
Merged
Conversation
…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.
We need to publish this package!
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.
resolves #16909
Lms24
approved these changes
Jul 11, 2025
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)) |
Member
There was a problem hiding this comment.
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)) |
2076cdc to
ccf61b2
Compare
There was a problem hiding this comment.
Bug: Timestamp Function Fails to Use Performance API
The createUnixTimestampInSecondsFunc now incorrectly falls back to dateTimestampInSeconds in two scenarios:
- It no longer calculates an approximate
timeOriginwhenperformance.timeOriginis unavailable butperformance.now()is present, instead falling back entirely toDate.now(). - The condition
!performance.timeOriginincorrectly triggers a fallback whenperformance.timeOriginis0(a valid Unix epoch value), causing the function to useDate.now()even when the Performance API is fully available.
packages/core/src/utils/time.ts#L34-L42
sentry-javascript/packages/core/src/utils/time.ts
Lines 34 to 42 in ccf61b2
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
sentry-javascript/packages/core/test/lib/integrations/captureconsole.test.ts
Lines 127 to 140 in ccf61b2
Was this report helpful? Give feedback by reacting with 👍 or 👎
Contributor
size-limit report 📦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.