Skip to content

Commit 8106bfa

Browse files
feat: Do not report ajax nodes in session traces if in deny list (#750)
Co-authored-by: Chunwai Li <[email protected]>
1 parent a7f58a3 commit 8106bfa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/features/ajax/aggregate/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export class Aggregate extends AggregateBase {
8181
hash = stringify([params.status, params.host, params.pathname])
8282
}
8383

84-
handle('bstXhrAgg', ['xhr', hash, params, metrics], undefined, FEATURE_NAMES.sessionTrace, ee)
85-
8684
// store as metric
8785
aggregator.store('xhr', hash, params, metrics)
8886

@@ -98,6 +96,8 @@ export class Aggregate extends AggregateBase {
9896
return
9997
}
10098

99+
handle('bstXhrAgg', ['xhr', hash, params, metrics], undefined, FEATURE_NAMES.sessionTrace, ee)
100+
101101
var xhrContext = this
102102

103103
var event = {

tests/functional/stn/ajax.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ testDriver.test('session trace ajax deny list', function (t, browser, router) {
9494
const body = result.request.body
9595
const harvestBody = body.res
9696
const loadNodes = harvestBody.filter(function (node) { return node.t === 'ajax' })
97-
t.ok(loadNodes.length > 0, 'XMLHttpRequest nodes captured even with ajax deny list')
97+
t.ok(loadNodes.length === 0, 'XMLHttpRequest nodes are not captured with ajax deny list')
9898

9999
t.end()
100100
}).catch(fail)

0 commit comments

Comments
 (0)