File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
export { Dedupe } from './dedupe' ;
2
2
export { FunctionToString } from './functiontostring' ;
3
3
export { InboundFilters } from './inboundfilters' ;
4
- export { ExtraErrorData } from './extraerrordata' ;
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import { isError, isPlainObject } from '@sentry/utils/is';
4
4
import { logger } from '@sentry/utils/logger' ;
5
5
import { normalize } from '@sentry/utils/object' ;
6
6
7
+ /** JSDoc */
8
+ interface ExtraErrorDataOptions {
9
+ depth ?: number ;
10
+ }
11
+
7
12
/** Patch toString calls to return proper name for wrapped functions */
8
13
export class ExtraErrorData implements Integration {
9
14
/**
@@ -16,6 +21,11 @@ export class ExtraErrorData implements Integration {
16
21
*/
17
22
public static id : string = 'ExtraErrorData' ;
18
23
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ public constructor ( private readonly options : ExtraErrorDataOptions = { depth : 3 } ) { }
28
+
19
29
/**
20
30
* @inheritDoc
21
31
*/
@@ -44,7 +54,7 @@ export class ExtraErrorData implements Integration {
44
54
...event . extra ,
45
55
} ;
46
56
47
- const normalizedErrorData = normalize ( errorData ) ;
57
+ const normalizedErrorData = normalize ( errorData , this . options . depth ) ;
48
58
if ( isPlainObject ( normalizedErrorData ) ) {
49
59
extra = {
50
60
...event . extra ,
Original file line number Diff line number Diff line change 1
1
import { ExtendedError , SentryEvent } from '@sentry/types' ;
2
- import { ExtraErrorData } from '../../../ src/integrations /extraerrordata' ;
2
+ import { ExtraErrorData } from '../src/extraerrordata' ;
3
3
4
4
const extraErrorData = new ExtraErrorData ( ) ;
5
5
let event : SentryEvent ;
You can’t perform that action at this time.
0 commit comments