sentry-electron
sentry-electron copied to clipboard
`electron.net` breadcrumbs are recorded for sending Sentry envelopes:
Versions + Platform
- SDK version -
@sentry/[email protected] - Electron version -
all - Platform -
all
Description
electron.net breadcrumbs are recorded for sending Sentry envelopes:

This code attempts to stop this but isn't working for some reason: https://github.com/getsentry/sentry-electron/blob/cfeacf652bf6fdc8c026d2a6684ab9fcab733d6b/src/main/integrations/net-breadcrumbs.ts#L137-L139
This is a strange one since I can't reproduce this locally 🤔
Seems like the request headers are only added for the store endpoint and node? https://github.com/getsentry/sentry-javascript/blob/db661b4ca60f5bce3ba3e587722b4b1a2643dc9b/packages/core/src/api.ts#L147-L167
Can we grab details about the dsn/URL from options and try to match that way?
Seems like the request headers are only added for the store endpoint and node?
I ran the e2e tests and logged the headers at the test server and logged at the point where we bail out for Sentry requests and everything I saw was as expected
Can we grab details about the dsn/URL from options and try to match that way?
Yep, that might be more reliable.
Now I'm thinking it may be related to the ordering/execution here: https://github.com/getsentry/sentry-electron/blob/75a3b3bbd0ce98f2506b74d3a2b3cf55b11ed2cf/src/main/integrations/net-breadcrumbs.ts#L134-L139
originalRequestMethod.apply is calling and starting the request. I'm only actually seeing electron.net breadcrumbs for failed requests. If the request fails, maybe the headers are missing and the check fails?