Skip to content

Deeply Nested objects aren't being serialised  #2539

Closed
@drwharris

Description

@drwharris

Package + Version

  • @sentry/browser
  • [X ] @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

5.15.4

Description

This seems to have regressed. I have this code to setup Sentry:

import { ExtraErrorData } from '@sentry/integrations';
Sentry.init({
        dsn: 'MYDSN',
        release: `${Settings.name}@${module.exports.version}`,
        integrations: [new ExtraErrorData({ depth: 10 })],
    });


And I get this


{
	"smart_search": {
		"user_id": "[Object]", <<- Note this
		"id": "[Array]", <<- Note this
		"environment": "prod",
		"path": "/checkout/cart",
		"api_key": "<redacted>",
		"event": "<redacted>"
	},
	"original": {
		"UserName": "",
		"DeviceData": "[Object]", <<- Note this
		"Sequence": <redacted>,
		"Url": "<redacted>",
		"Type": "<redacted>",
		"AcquisitionId": "<redacted>",
		"ClientId": "<redacted>",
		"Environment": "<redacted>",
		"Item": "[Object]", <<- Note this
		"SessionId": "<redacted>",
		"Version": "<redacted>",
		"Referer": "<redacted>",
		"Geographical": "[Object]", <<- Note this
		"Fingerprint": "<redacted>",
		"UserAgent": "<redacted>",
		"IpAddress": "<redacted>",
		"EventDate": "[Object]" <<- Note this
	}
}

A quick search finds me #2417 but not why. This seems to be my issue as in the end I am calling setExtra and always have (even in my original issue) so I am going to see if does actually fix it but...

Why does the ExtraErrorData({ depth: 10 }) option no longer work?

Why did this change?

Where is the documentation on normalizeDepth?

What should I actually be doing now? Do I need

Sentry.init({
...
integrations: [new Sentry.Integrations.ExtraErrorData({ depth: 10 })],
normalizeDepth: 5
});

or just

Sentry.init({
...
normalizeDepth: 5
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions