-
Notifications
You must be signed in to change notification settings - Fork 898
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
Wrap all heartbeats methods in try/catch #8425
Conversation
🦋 Changeset detectedLatest commit: 27eba97 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (150,977 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
// service, not the browser user agent. | ||
const agent = platformLogger.getPlatformInfoString(); | ||
const date = getUTCDateString(); | ||
console.log('heartbeats', this._heartbeatsCache?.heartbeats); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional or an oversight?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @hsubox76
this is showing in our production logs now, can you please remove it
it took me a while to see where is it coming from
I updated many dependencies and wasn't sure which one caused these logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After updating Firebase to version 10.13.0, I'm seeing a console log message that says heartbeats undefined
. It would be great if the log could be removed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't update to 10.13.0 because of this as it adds a lot of noise to my frontend monitoring logs.
EDIT: they'll release a fix soon: #8436 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GogoVega @robertIsaac @Tosters @BenaymS @gustavopch
This was removed in 10.13.1
Heartbeat code should never throw and interfere with developer app operation. This PR wraps the two main heartbeat methods,
triggerHeartbeat()
andgetHeartbeatsHeader()
in try/catch blocks that hopefully catch unexpected errors in uncommon environments and logs aconsole.warn()
instead.I've been told in previous issues that thrown errors cause a lot of noise in Sentry logs (plus interrupting the app) while a
console.warn()
does not clog up Sentry logs, so I think this is a good compromise to avoid swallowing any fixable errors that we might want to know about.Fixes #8407