Skip to content

Commit 276c4f6

Browse files
feat: remove unused data from stn requests (#570)
1 parent 0b3c3a7 commit 276c4f6

File tree

5 files changed

+19
-32
lines changed

5 files changed

+19
-32
lines changed

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/features/session_trace/aggregate/index.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55
import { registerHandler } from '../../../common/event-emitter/register-handler'
66
import { HarvestScheduler } from '../../../common/harvest/harvest-scheduler'
7-
import { stringify } from '../../../common/util/stringify'
87
import { parseUrl } from '../../../common/url/parse-url'
98
import { getConfigurationValue, getInfo, getRuntime } from '../../../common/config/config'
109
import { now } from '../../../common/timing/now'
@@ -325,18 +324,10 @@ export class Aggregate extends AggregateBase {
325324
this.trace = {}
326325
this.nodeCount = 0
327326

328-
const stnInfo = {
327+
return {
329328
qs: { st: String(getRuntime(this.agentIdentifier).offset) },
330329
body: { res: stns }
331330
}
332-
if (!this.ptid) { // send custom and user attributes on the very first ST harvest only
333-
const { userAttributes, atts, jsAttributes } = getInfo(this.agentIdentifier)
334-
stnInfo.qs.ua = userAttributes
335-
stnInfo.qs.at = atts
336-
const ja = stringify(jsAttributes)
337-
stnInfo.qs.ja = ja === '{}' ? null : ja
338-
}
339-
return stnInfo
340331
}
341332

342333
smearEvtsByOrigin (name) {

tests/functional/stn/index.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,15 @@ const testDriver = require('../../../tools/jil/index')
88
let supported = testDriver.Matcher.withFeature('stn')
99

1010
testDriver.test('posts session traces', supported, function (t, browser, router) {
11-
t.plan(5)
12-
1311
let rumPromise = router.expectRum()
1412
let resourcePromise = router.expectResources()
1513
let loadPromise = browser.get(router.assetURL('lotsatimers.html')).waitForFeature('loaded')
1614

1715
Promise.all([resourcePromise, rumPromise, loadPromise]).then(([{ request: { query } }]) => {
1816
t.ok(+query.st > 1408126770885, `Got start time ${query.st}`)
1917
t.notok(query.ptid, 'No ptid on first harvest')
20-
t.equal(query.ja, '{"aargh":"somanytimers"}', 'custom javascript attributes (on stn first post)')
2118
return router.expectResources().then(({ request: { query } }) => {
2219
t.ok(query.ptid, `ptid on second harvest ${query.ptid}`)
23-
t.equal(query.ja, undefined, 'no javascript attributes (on stn second post)')
2420
t.end()
2521
})
2622
}).catch(fail)

tests/functional/xhr/ajax-events.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ testDriver.test('Disabled ajax events', function (t, browser, router) {
3030
})
3131

3232
testDriver.test('capturing XHR ajax events', function (t, browser, router) {
33-
const ajaxPromise = router.expectAjaxEvents(5000)
33+
const ajaxPromise = router.expectAjaxEvents(10000)
3434
const rumPromise = router.expectRum()
3535
const loadPromise = browser.safeGet(router.assetURL('xhr-outside-interaction.html', {
3636
loader: 'spa',
3737
init: {
3838
ajax: {
39-
harvestTimeSeconds: 2,
39+
harvestTimeSeconds: 5,
4040
enabled: true
4141
}
4242
}
@@ -53,8 +53,8 @@ testDriver.test('capturing XHR ajax events', function (t, browser, router) {
5353

5454
testDriver.test('capturing large payload of XHR ajax events', function (t, browser, router) {
5555
const ajaxPromises = Promise.all([
56-
router.expectAjaxEvents(8000),
57-
router.expectAjaxEvents(16000)
56+
router.expectAjaxEvents(10000),
57+
router.expectAjaxEvents(20000)
5858
])
5959
const rumPromise = router.expectRum()
6060
const loadPromise = browser.safeGet(router.assetURL('xhr-large-payload.html', {

tools/browsers-lists/browsers-supported.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"browserName": "chrome",
55
"platformName": "Windows 11",
66
"platform": "Windows 11",
7-
"version": "104",
8-
"browserVersion": "104"
7+
"version": "105",
8+
"browserVersion": "105"
99
},
1010
{
1111
"browserName": "chrome",
1212
"platformName": "Windows 11",
1313
"platform": "Windows 11",
14-
"version": "107",
15-
"browserVersion": "107"
14+
"version": "108",
15+
"browserVersion": "108"
1616
},
1717
{
1818
"browserName": "chrome",
@@ -34,15 +34,15 @@
3434
"browserName": "MicrosoftEdge",
3535
"platformName": "Windows 11",
3636
"platform": "Windows 11",
37-
"version": "104",
38-
"browserVersion": "104"
37+
"version": "105",
38+
"browserVersion": "105"
3939
},
4040
{
4141
"browserName": "MicrosoftEdge",
4242
"platformName": "Windows 11",
4343
"platform": "Windows 11",
44-
"version": "107",
45-
"browserVersion": "107"
44+
"version": "108",
45+
"browserVersion": "108"
4646
},
4747
{
4848
"browserName": "MicrosoftEdge",

0 commit comments

Comments
 (0)