File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/browser/src/integrations/pluggable Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,22 @@ export class Vue implements Integration {
30
30
*/
31
31
private readonly Vue : any ; // tslint:disable-line:variable-name
32
32
33
+ /**
34
+ * When set to false, Sentry will suppress reporting all props data
35
+ * from your Vue components for privacy concerns.
36
+ */
37
+ private readonly attachProps : boolean ;
38
+
33
39
/**
34
40
* @inheritDoc
35
41
*/
36
- public constructor ( options : { Vue ?: any } = { } ) {
42
+ public constructor ( options : { Vue ?: any ; attachProps ?: boolean } = { } ) {
37
43
this . Vue =
38
44
options . Vue ||
39
45
( getGlobalObject ( ) as {
40
46
Vue : any ;
41
47
} ) . Vue ;
48
+ this . attachProps = options . attachProps || true ;
42
49
}
43
50
44
51
/** JSDoc */
@@ -69,7 +76,10 @@ export class Vue implements Integration {
69
76
70
77
if ( isPlainObject ( vm ) ) {
71
78
metadata . componentName = this . formatComponentName ( vm ) ;
72
- metadata . propsData = vm . $options . propsData ;
79
+
80
+ if ( this . attachProps ) {
81
+ metadata . propsData = vm . $options . propsData ;
82
+ }
73
83
}
74
84
75
85
if ( ! isUndefined ( info ) ) {
You can’t perform that action at this time.
0 commit comments