Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(utils): Simplify console instrumentation #4533

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

AbhiPrasad
Copy link
Member

Apply changes from #4505 that applied to CaptureConsole integration to the instrumentConsole func in @sentry/utils.

It's important to note that the logic in utils, in CaptureConsole and the node Console integration is very similar, perhaps we can refactor to combine them.

Opened #4532 to track this.

Apply changes from #4505
that applied to `CaptureConsole` integration to the `instrumentConsole`
func in `@sentry/utils`.

It's important to note that the logic in utils, in `CaptureConsole` and
the node `Console` integration is very similar, perhaps we can refactor
to combine them.
@AbhiPrasad AbhiPrasad requested review from lobsterkatie, a team and Lms24 and removed request for a team February 9, 2022 20:58
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

size-limit report

Path Base Size (5df78df) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.77 KB 19.76 KB -0.03% 🔽
@sentry/browser - ES5 CDN Bundle (minified) 63.17 KB 63.15 KB -0.04% 🔽
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.51 KB 18.51 KB -0.02% 🔽
@sentry/browser - ES6 CDN Bundle (minified) 56.8 KB 56.77 KB -0.04% 🔽
@sentry/browser - Webpack (gzipped + minified) 22.21 KB 22.2 KB -0.04% 🔽
@sentry/browser - Webpack (minified) 76.02 KB 76 KB -0.04% 🔽
@sentry/react - Webpack (gzipped + minified) 22.24 KB 22.24 KB -0.04% 🔽
@sentry/nextjs Client - Webpack (gzipped + minified) 46.31 KB 46.31 KB -0.02% 🔽
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.32 KB 28.32 KB -0.02% 🔽

Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

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

👍🏻

@AbhiPrasad AbhiPrasad merged commit ff5595c into master Feb 10, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-console-instrument-method branch February 10, 2022 11:59
if (originalConsoleLevel) {
Function.prototype.apply.call(originalConsoleLevel, global.console, args);
if (originalConsoleMethod) {
originalConsoleMethod.call(global.console, args);

Choose a reason for hiding this comment

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

Hi @AbhiPrasad,
Seems like there should be apply instead of call.
image

@AbhiPrasad
Copy link
Member Author

Yup, we'll fix!

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.

None yet

3 participants