Skip to content

⬆️ update browser-sdk to 7.4.0 and js-core to 0.0.4#145

Merged
bcaudan merged 4 commits into
mainfrom
bcaudan/update-browser-sdk
Jun 24, 2026
Merged

⬆️ update browser-sdk to 7.4.0 and js-core to 0.0.4#145
bcaudan merged 4 commits into
mainfrom
bcaudan/update-browser-sdk

Conversation

@bcaudan

@bcaudan bcaudan commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Keeps the SDK up to date with the latest browser-sdk release.

Changes

  • Bump @datadog/browser-rum, @datadog/browser-core and @datadog/js-core across all workspaces (root, playground, e2e app, 7 integration apps)
  • Work around resetMonitor removal: the function is declared in browser-core v7's .d.ts but absent from the JS
  • Move several utilities from @datadog/browser-core to @datadog/js-core.

Test instructions

ci should pass

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated related documentation.

@bcaudan

bcaudan commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 22180232db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bcaudan bcaudan marked this pull request as ready for review June 24, 2026 08:40
@bcaudan bcaudan requested a review from a team as a code owner June 24, 2026 08:40
Copilot AI review requested due to automatic review settings June 24, 2026 08:40
@bcaudan bcaudan changed the title ⬆️ update browser-sdk to 7.4.0 and js-core 0.0.4 ⬆️ update browser-sdk to 7.4.0 and js-core to 0.0.4 Jun 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Electron SDK repo to align with @datadog/browser-* 7.4.0 and @datadog/js-core 0.0.4, including refactors to consume utilities that moved from browser-core to js-core, and an adaptation for the removal of resetMonitor() in browser-core v7.

Changes:

  • Bump @datadog/browser-rum, @datadog/browser-core, and @datadog/js-core versions across the root workspace, playground, e2e app, and integration apps (plus corresponding lockfiles).
  • Replace resetMonitor() usage with a startMonitorErrorCollection(noop) workaround on telemetry shutdown.
  • Migrate various utility imports (e.g., combine, deepClone, RecursivePartial, DISCARDED/SKIPPED, time constants/types) from @datadog/browser-core to @datadog/js-core/*.

PR Review — Score: 3.7 / 5

Changes look directionally correct for the dependency bump and the js-core utility moves, but I would not approve as-is due to a missing unit test around the new telemetry shutdown workaround.

Why 3.7: Broad, consistent version bump across workspaces; import migrations are systematic; telemetry workaround is plausible and keeps runtime compatibility with browser-core v7.

Why not higher: The telemetry shutdown behavior changed in a subtle way (global monitor error collection), and there’s no direct unit test to prevent regressions (errors emitted after stopTelemetry()).


Findings

Severity Item
Minor Add a unit test for telemetry stop behavior with monitored errorsstop() now relies on swapping the monitor error callback to a noop; add a test proving monitor/callMonitored errors do not produce telemetry events after stopTelemetry().

Architectural flow

sequenceDiagram
  participant App as SDK code using monitor()/callMonitored()
  participant Monitor as browser-core monitor module
  participant Telemetry as Telemetry instance
  participant EM as EventManager

  Telemetry->>Monitor: startMonitorErrorCollection(cb => Telemetry.addError(cbArg))
  App->>Monitor: monitor(fnThatThrows)()
  Monitor->>Telemetry: cb(error)
  Telemetry->>EM: notify(RAW TELEMETRY error event)

  Telemetry->>Monitor: startMonitorErrorCollection(noop) on stop()
  App->>Monitor: monitor(fnThatThrows)()
  Monitor->>Monitor: noop(error) (dropped)
Loading

Before: Telemetry.stop() called resetMonitor() to stop forwarding monitor errors into telemetry.
After: Telemetry.stop() swaps the monitor error callback to a noop via startMonitorErrorCollection(noop) so monitor errors are dropped after telemetry shutdown.

Reviewed changes

Copilot reviewed 33 out of 43 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Bumps @datadog/browser-core to 7.4.0 and @datadog/js-core to 0.0.4 in the root lockfile.
package.json Updates root devDependencies to @datadog/browser-core@7.4.0 and @datadog/js-core@0.0.4.
src/mocks.specUtil.ts Switches test utilities (combine, mergeInto, RecursivePartial, ServerDuration) to @datadog/js-core/*.
src/event/EventManager.spec.ts Switches RecursivePartial import to @datadog/js-core/util.
src/domain/tracing/SpanProcessor.ts Migrates combine, DISCARDED, and time types to @datadog/js-core/*; keeps generateUUID from browser-core.
src/domain/tracing/SpanProcessor.spec.ts Migrates DISCARDED/SKIPPED to @datadog/js-core/assembly.
src/domain/tracing/rawTracingData.types.ts Migrates ServerDuration type import to @datadog/js-core/time.
src/domain/telemetry/Telemetry.ts Replaces resetMonitor() with startMonitorErrorCollection(noop) on stop; keeps monitor exports.
src/domain/telemetry/rawTelemetryData.types.ts Migrates RecursivePartial type import to @datadog/js-core/util.
src/domain/session/SessionManager.ts Migrates deepClone to @datadog/js-core/util; keeps generateUUID in browser-core.
src/domain/session/SessionManager.spec.ts Migrates DISCARDED to @datadog/js-core/assembly.
src/domain/session/SessionContext.ts Migrates DISCARDED/SKIPPED to @datadog/js-core/assembly.
src/domain/session/SessionContext.spec.ts Migrates DISCARDED to @datadog/js-core/assembly.
src/domain/rum/view/ViewContext.ts Migrates DISCARDED/SKIPPED to @datadog/js-core/assembly.
src/domain/rum/view/ViewContext.spec.ts Migrates DISCARDED to @datadog/js-core/assembly.
src/domain/rum/rawRumData.types.ts Migrates RecursivePartial and duration/time types to @datadog/js-core/*.
src/domain/rum/operation/OperationCollection.ts Migrates isIndexableObject to @datadog/js-core/util.
src/domain/rum/error/ErrorCollection.ts Migrates timeStampNow to @datadog/js-core/time.
src/assembly/RendererPipeline.ts Migrates combine, DISCARDED, and TimeStamp to @datadog/js-core/*.
src/assembly/RendererPipeline.spec.ts Migrates DISCARDED and TimeStamp type imports to @datadog/js-core/*.
src/assembly/MainAssembly.ts Migrates combine, DISCARDED, and timeStampNow to @datadog/js-core/*.
src/assembly/MainAssembly.spec.ts Migrates DISCARDED and TimeStamp type imports to @datadog/js-core/*.
src/assembly/hooks.ts Migrates combine, DISCARDED/SKIPPED, and RecursivePartial to @datadog/js-core/*.
src/assembly/hooks.spec.ts Migrates DISCARDED/SKIPPED imports to @datadog/js-core/assembly.
playground/package.json Bumps playground @datadog/browser-rum dependency to 7.4.0.
playground/yarn.lock Updates playground lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/app/package.json Bumps e2e app @datadog/browser-rum dependency to 7.4.0.
e2e/app/yarn.lock Updates e2e app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/scenarios/integration.scenario.ts Migrates ONE_SECOND import to @datadog/js-core/time.
e2e/integration/apps/forge-webpack/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/forge-vite/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/forge-vite/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/apps/forge-esbuild-esm/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/forge-esbuild-esm/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/apps/forge-esbuild-cjs/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/forge-esbuild-cjs/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/apps/electron-vite/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/electron-vite/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/apps/electron-vite-esm/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/electron-vite-esm/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.
e2e/integration/apps/electron-builder-vite/package.json Bumps integration app @datadog/browser-rum to 7.4.0.
e2e/integration/apps/electron-builder-vite/yarn.lock Updates integration app lockfile to browser-sdk 7.4.0 + js-core 0.0.4.

Comment thread src/domain/telemetry/Telemetry.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22180232db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
@bcaudan bcaudan merged commit fc031b3 into main Jun 24, 2026
15 checks passed
@bcaudan bcaudan deleted the bcaudan/update-browser-sdk branch June 24, 2026 09:05
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.

3 participants