You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(utils): Limit normalize maximum properties/elements (#4689)
This limits the number of properties/elements serialized for an object/array, to protect against huge objects being serialized if users inadvertently log them. To control this, a new `normalizeMaxBreadth` option has been added, which defaults to 1000.
Documented in getsentry/sentry-docs#4844.
Copy file name to clipboardExpand all lines: packages/types/src/options.ts
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,17 @@ export interface Options {
101
101
*/
102
102
normalizeDepth?: number;
103
103
104
+
/**
105
+
* Maximum number of properties or elements that the normalization algorithm will output in any single array or object included in the normalized event.
106
+
* Used when normalizing an event before sending, on all of the listed attributes:
107
+
* - `breadcrumbs.data`
108
+
* - `user`
109
+
* - `contexts`
110
+
* - `extra`
111
+
* Defaults to `1000`
112
+
*/
113
+
normalizeMaxBreadth?: number;
114
+
104
115
/**
105
116
* Controls how many milliseconds to wait before shutting down. The default is
106
117
* SDK-specific but typically around 2 seconds. Setting this too low can cause
0 commit comments