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

core(trace-elements): add sentry debugging for impactedNodes #15915

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

adamraine
Copy link
Member

This should alleviate the symptoms of #15870 and adds some extra sentry instrumentation to help us get to the bottom of this.

@adamraine adamraine requested a review from a team as a code owner April 3, 2024 18:16
@adamraine adamraine requested review from connorjclark and removed request for a team April 3, 2024 18:16
// `impactedNodes` really is and also prevent the error from being fatal.
Sentry.captureException(err, {
extra: {
impactedNodes,
Copy link
Collaborator

@connorjclark connorjclark Apr 5, 2024

Choose a reason for hiding this comment

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

It's possible the object can't be serialized for some reason (what if its a map), so to be safe... can you add three more fields:

let impactedNodesString = '?';
try { impactedNodesString = JSON.stringify(impactedNodes) } catch {}

const impactedNodesType = typeof impactedNodesString;

const impactedNodesClassName = impactedNodes?.constructor?.name;

(in addition to impactedNodes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants