@@ -115,6 +115,14 @@ export class Configuration implements IConfigurationSettings {
115115 */
116116 private _dataExclusions : string [ ] = [ ] ;
117117
118+ private _includePrivateInformation : boolean ;
119+ private _includeUserName : boolean ;
120+ private _includeMachineName : boolean ;
121+ private _includeIpAddress : boolean ;
122+ private _includeCookies : boolean ;
123+ private _includePostData : boolean ;
124+ private _includeQueryString : boolean ;
125+
118126 /**
119127 * A list of user agent patterns.
120128 * @type {Array }
@@ -148,6 +156,7 @@ export class Configuration implements IConfigurationSettings {
148156 this . serverUrl = configSettings . serverUrl ;
149157 this . heartbeatServerUrl = configSettings . heartbeatServerUrl ;
150158 this . updateSettingsWhenIdleInterval = configSettings . updateSettingsWhenIdleInterval ;
159+ this . includePrivateInformation = configSettings . includePrivateInformation ;
151160
152161 this . environmentInfoCollector = inject ( configSettings . environmentInfoCollector ) ;
153162 this . errorParser = inject ( configSettings . errorParser ) ;
@@ -286,6 +295,138 @@ export class Configuration implements IConfigurationSettings {
286295 this . _dataExclusions = Utils . addRange < string > ( this . _dataExclusions , ...exclusions ) ;
287296 }
288297
298+ /**
299+ * Gets a value indicating whether to include private information about the local machine.
300+ * @returns {boolean }
301+ */
302+ public get includePrivateInformation ( ) : boolean {
303+ return this . _includePrivateInformation ;
304+ }
305+
306+ /**
307+ * Sets a value indicating whether to include private information about the local machine
308+ * @param value
309+ */
310+ public set includePrivateInformation ( value : boolean ) {
311+ const val = value || false ;
312+ this . _includePrivateInformation = val ;
313+ this . includeUserName = val ;
314+ this . _includeMachineName = val ;
315+ this . includeIpAddress = val ;
316+ this . includeCookies = val ;
317+ this . includePostData = val ;
318+ this . includeQueryString = val ;
319+ this . changed ( ) ;
320+ }
321+
322+ /**
323+ * Gets a value indicating whether to include User Name.
324+ * @returns {boolean }
325+ */
326+ public get includeUserName ( ) : boolean {
327+ return this . _includeUserName ;
328+ }
329+
330+ /**
331+ * Sets a value indicating whether to include User Name.
332+ * @param value
333+ */
334+ public set includeUserName ( value : boolean ) {
335+ this . _includeUserName = value || false ;
336+ this . changed ( ) ;
337+ }
338+
339+ /**
340+ * Gets a value indicating whether to include MachineName in MachineInfo.
341+ * @returns {boolean }
342+ */
343+ public get includeMachineName ( ) : boolean {
344+ return this . _includeMachineName ;
345+ }
346+
347+ /**
348+ * Sets a value indicating whether to include MachineName in MachineInfo.
349+ * @param value
350+ */
351+ public set includeMachineName ( value : boolean ) {
352+ this . _includeMachineName = value || false ;
353+ this . changed ( ) ;
354+ }
355+
356+ /**
357+ * Gets a value indicating whether to include Ip Addresses in MachineInfo and RequestInfo.
358+ * @returns {boolean }
359+ */
360+ public get includeIpAddress ( ) : boolean {
361+ return this . _includeIpAddress ;
362+ }
363+
364+ /**
365+ * Sets a value indicating whether to include Ip Addresses in MachineInfo and RequestInfo.
366+ * @param value
367+ */
368+ public set includeIpAddress ( value : boolean ) {
369+ this . _includeIpAddress = value || false ;
370+ this . changed ( ) ;
371+ }
372+
373+ /**
374+ * Gets a value indicating whether to include Cookies.
375+ * NOTE: DataExclusions are applied to all Cookie keys when enabled.
376+ * @returns {boolean }
377+ */
378+ public get includeCookies ( ) : boolean {
379+ return this . _includeCookies ;
380+ }
381+
382+ /**
383+ * Sets a value indicating whether to include Cookies.
384+ * NOTE: DataExclusions are applied to all Cookie keys when enabled.
385+ * @param value
386+ */
387+ public set includeCookies ( value : boolean ) {
388+ this . _includeCookies = value || false ;
389+ this . changed ( ) ;
390+ }
391+
392+ /**
393+ * Gets a value indicating whether to include Form/POST Data.
394+ * NOTE: DataExclusions are only applied to Form data keys when enabled.
395+ * @returns {boolean }
396+ */
397+ public get includePostData ( ) : boolean {
398+ return this . _includePostData ;
399+ }
400+
401+ /**
402+ * Sets a value indicating whether to include Form/POST Data.
403+ * NOTE: DataExclusions are only applied to Form data keys when enabled.
404+ * @param value
405+ */
406+ public set includePostData ( value : boolean ) {
407+ this . _includePostData = value || false ;
408+ this . changed ( ) ;
409+ }
410+
411+ /**
412+ * Gets a value indicating whether to include query string information.
413+ * NOTE: DataExclusions are applied to all Query String keys when enabled.
414+ * @returns {boolean }
415+ */
416+ public get includeQueryString ( ) : boolean {
417+ return this . _includeQueryString ;
418+ }
419+
420+ /**
421+ * Sets a value indicating whether to include query string information.
422+ * NOTE: DataExclusions are applied to all Query String keys when enabled.
423+ * @param value
424+ */
425+ public set includeQueryString ( value : boolean ) {
426+ this . _includeQueryString = value || false ;
427+ this . changed ( ) ;
428+ }
429+
289430 /**
290431 * A list of user agent patterns that will cause any event with a matching user agent to not be submitted.
291432 *
@@ -468,7 +609,7 @@ export class Configuration implements IConfigurationSettings {
468609 */
469610 public static get defaults ( ) {
470611 if ( Configuration . _defaultSettings === null ) {
471- Configuration . _defaultSettings = { } ;
612+ Configuration . _defaultSettings = { includePrivateInformation : true } ;
472613 }
473614
474615 return Configuration . _defaultSettings ;
0 commit comments