-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Deeply Nested objects aren't being serialised #1964
Comments
You should be able to define the depth yourself:
We reduced the limit drastically since it caused many problems for users. |
@HazAT |
TBH, this is sadly poorly documented and should be here: I will write this down to improve, and yes, this is JS specific. |
OK Thank you. |
Sorry to come back to this but I have just updated to 5.4.0 and its now erroring with: Property 'ExtraErrorData' does not exist on type '{ Console: typeof Console; Http: typeof Http; OnUncaughtException: typeof OnUncaughtException; OnUnhandledRejection: typeof OnUnhandledRejection; LinkedErrors: typeof LinkedErrors; Modules: typeof Modules; FunctionToString: typeof FunctionToString; InboundFilters: typeof InboundFilters; }'. 21 integrations: [new Sentry.Integrations.ExtraErrorData({ depth: 10 })] |
import { ExtraErrorData } from '@sentry/integrations'; |
This seems to have regressed. I have this:
And I get this
|
You need to use the undocumented new param In your example:
See also: #2404 |
I've run into the same problem and can confirm that adding The option was add in #2404 (shipped in v5.12.0), but I could not find any documentation |
We are aware of this issue - #2539 (comment) |
Hello, I have an issue that might be related and that I can not get to work. Just to be sure, If so, I am using Sentry 5.22.1 and it doesn't seems to work: Sentry.init({
dsn: 'https://mydsn',
integrations: [new ExtraErrorData({ depth: 9 })],
normalizeDepth: 10,
}); And the additional data {
error: {
errors: {
Views: [Array]
},
status: 400,
...
},
...
} |
I just verified it locally and it works just fine for me: Sentry.init({
dsn: "__public_dsn__",
integrations: [new Sentry.Integrations.ExtraErrorData({ depth: 9 })],
normalizeDepth: 10,
beforeSend(event) {
console.log(event);
return null;
},
});
const err = new Error("foo");
err.some = {
additional: {
data: [{ foo: { bar: 123 } }],
},
};
Sentry.captureException(err); |
Ok, thank you for your reply, I'll try to figure out where my problem comes from. |
I work only with normalizeDepth: 11
|
Duplicate of #2539 |
Same here, adding only normalizeDepth worked for me |
Important Details
I have a Node JS 11.9 application
Description
Just upgraded the package to "@sentry/node": "^4.6.5" from "@sentry/node": "^4.5.4".
When adding objects to Addition Data I would see the following logged:
Unfortunately, now after upgrading I am getting:
Steps to Reproduce
I have this class
which I then use as follows:
What you expected to happen
As per previous versions, deep objects should be logged in detail
The text was updated successfully, but these errors were encountered: