Skip to content

Commit

Permalink
Update index.d.ts and test.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoolioh committed Jun 6, 2023
1 parent 1595f8b commit ea3ddd2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ tracer.init({
obfuscatorKeyRegex: '.*',
obfuscatorValueRegex: '.*',
blockedTemplateHtml: './blocked.html',
blockedTemplateJson: './blocked.json'
blockedTemplateJson: './blocked.json',
eventTracking: {
enabled: true,
mode: 'safe'
}
}
});

Expand Down
16 changes: 16 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,22 @@ export declare interface TracerOptions {
* Specifies a path to a custom blocking template json file.
*/
blockedTemplateJson?: string,

/**
* Controls the automated user event tracking configuration
*/
eventTracking?: {
/**
* Whether to enable automated user event tracking.
* @default true
*/
enabled?: boolean,
/**
* Constrols the automated user event tracking mode
* @default 'safe'
*/
mode?: string
}
};

/**
Expand Down
1 change: 0 additions & 1 deletion packages/dd-trace/src/appsec/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function passportTrackEvent (credentials, passportUser, rootSpan, mode) {

if (passportUser) {
// If a passportUser object is published then the login succeded
// TODO : test
setUserTags({ id: user['usr.id'] }, rootSpan)
// Prevent 'usr.id' from being reported again in the metadata
delete user['usr.id']
Expand Down

0 comments on commit ea3ddd2

Please sign in to comment.