Skip to content

fix: Add missing main process context to data from other processes - #1445

Merged
timfish merged 5 commits into
masterfrom
fix/renderer-span-attributes
Oct 2, 2026
Merged

timfish merged 5 commits into
masterfrom
fix/renderer-span-attributes

Conversation

@timfish

@timfish timfish commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Some data from renderer and utility processes is forwarded to Sentry without passing through the main process client. It was missing context that events from those processes already get.

Renderer spans now get:

  • sentry.release and sentry.environment from the main process (environment was always production)
  • sentry.sdk.name and sentry.sdk.version for the Electron SDK
  • electron.process
  • os.* and device.* on segment spans
  • ingest_settings.infer_ip from the main process dataCollection.userInfo
  • url.full and url.path normalized relative to the app path

Utility process spans, logs and metrics now get the same release, environment, SDK, electron.process, OS and device attributes. Their envelope headers use the Electron SDK and the main process trace context.

Main process spans now get electron.process: browser, the same as logs. The beforeEnvelope hook now normalizes frame paths in profile chunks. Chunks from @sentry/profiling-node only reach that hook once getsentry/sentry-javascript#24896 is released, so the test assertion for them is disabled until then.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 457b27b. Configure here.

Comment thread src/main/sdk.ts
@timfish timfish changed the title fix: Apply main process attributes to streamed renderer spans fix: Add missing main process context to data from other processes Sep 30, 2026
Comment thread src/main/integrations/normalize-paths.ts Outdated
timfish added a commit to getsentry/sentry-javascript that referenced this pull request Oct 1, 2026
…24896)

The continuous profiler sent `profile_chunk` envelopes straight to the
transport, so the `beforeEnvelope` hook never ran for them. It now uses
`client.sendEnvelope()`, as the browser `UIProfiler` does.

- Ref. getsentry/sentry-electron#1445
@timfish
timfish merged commit b78528c into master Oct 2, 2026
216 of 218 checks passed
@timfish
timfish deleted the fix/renderer-span-attributes branch October 2, 2026 09:57
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.

2 participants