getsentry / getsentry/sentry-javascript
Use Proxy for console instrumentation to avoid logs showing up as coming from `instrument.ts`
- 主要语言
- TypeScript
- 星标
- 8.7k
- 派生
- 1.8k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 515
描述
### Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
### How do you use Sentry?
Sentry Saas (sentry.io)
### Which SDK are you using?
@sentry/sveltekit
### SDK Version
7.73.0
### Framework Version
"@sveltejs/kit": "^1.25.2",
### Link to Sentry event
_No response_
### SDK Setup
```js
Sentry.init({
dsn: '...',
tracesSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,
// If you don't want to use Session Replay, just remove the line below:
integrations: [new Replay()],
environment: dev ? 'development' : 'production'
});
```
### Steps to Reproduce
On the new Syntax site, our console.logs in firefox are showing up as from sentry’s instrument.ts.
I know chrome has a list to x-google-ignorelist (https://developer.chrome.com/articles/x-google-ignore-list/) scripts like this and show the real source, but turning that on in Firefox hides the logs entirely.
Using firefox' "ignore" option on both instrument.ts and the entire `@sentry/utils` package doesn't seem to change anything.
I think this is a new problem as I've not encountered this before and used firefox for years. Confirmed in Firefox developer 119 and stable 118.
Several github issues saying to just turn console breadcrumbs off, but that doesn’t seem to be a good fix because we want those as well.
### Expected Result
it shows the source as authored
### Actual Result

贡献指南
评估
这个 Issue 还没有评估数据。