Skip to content

Commit da3af0d

Browse files
committed
🔧 Align experimentalFeature with feature flag
1 parent 28144ca commit da3af0d

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎packages/browser-core/src/tools/experimentalFeatures.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { objectHasValue } from './utils/objectUtils'
1616
export enum ExperimentalFeature {
1717
TRACK_INTAKE_REQUESTS = 'track_intake_requests',
1818
PARTIAL_VIEW_UPDATES = 'partial_view_updates',
19-
TRACK_WEB_SOCKETS = 'track_web_sockets',
19+
TRACK_WEBSOCKETS = 'track_websockets',
2020
}
2121

2222
const enabledExperimentalFeatures: Set<ExperimentalFeature> = new Set()

‎packages/browser-rum-core/src/boot/startRum.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export function startRumEventCollection(
228228

229229
const vitalCollection = startVitalCollection(lifeCycle, pageStateHistory)
230230

231-
if (isExperimentalFeatureEnabled(ExperimentalFeature.TRACK_WEB_SOCKETS) && configuration.trackResources) {
231+
if (isExperimentalFeatureEnabled(ExperimentalFeature.TRACK_WEBSOCKETS) && configuration.trackResources) {
232232
const webSocketCollection = startWebSocketCollection(lifeCycle, viewHistory, vitalCollection.addDurationVital)
233233
cleanupTasks.push(webSocketCollection.stop)
234234
}

‎test/e2e/scenario/rum/websockets.scenario.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type RumResourceEventWithWebSocket = RumResourceEvent & {
2121

2222
test.describe('rum websockets', () => {
2323
createTest('collect websocket-connecting vital and websocket resource when the connection closes')
24-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
24+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
2525
.withBody(WebSocketPage.testBody())
2626
.run(async ({ intakeRegistry, flushEvents, page }) => {
2727
const ws = new WebSocketPage(page)
@@ -49,7 +49,7 @@ test.describe('rum websockets', () => {
4949
})
5050

5151
createTest('websocket resource ends with close_event when the server closes the echo socket')
52-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
52+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
5353
.withBody(WebSocketPage.testBody())
5454
.run(async ({ intakeRegistry, flushEvents, page, servers }) => {
5555
const ws = new WebSocketPage(page)
@@ -68,7 +68,7 @@ test.describe('rum websockets', () => {
6868
})
6969

7070
createTest('websocket resource is reported with session_end when the session expires')
71-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
71+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
7272
.withBody(WebSocketPage.testBody())
7373
.run(async ({ intakeRegistry, flushEvents, page, browserContext }) => {
7474
const ws = new WebSocketPage(page)
@@ -87,7 +87,7 @@ test.describe('rum websockets', () => {
8787
createTest(
8888
'websocket resource with session_end is still reported when the session is renewed before resource assembly'
8989
)
90-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
90+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
9191
.withBody(WebSocketPage.testBody())
9292
.run(async ({ intakeRegistry, flushEvents, page }) => {
9393
const ws = new WebSocketPage(page)
@@ -109,7 +109,7 @@ test.describe('rum websockets', () => {
109109
})
110110

111111
createTest('does not track websocket activity after the session is renewed')
112-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
112+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
113113
.withBody(WebSocketPage.testBody())
114114
.run(async ({ intakeRegistry, flushEvents, page, browserContext }) => {
115115
const ws = new WebSocketPage(page)
@@ -130,7 +130,7 @@ test.describe('rum websockets', () => {
130130
})
131131

132132
createTest('websocket resource keeps end_view_id when the session expires')
133-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
133+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
134134
.withBody(WebSocketPage.testBody())
135135
.run(async ({ intakeRegistry, flushEvents, page, browserContext }) => {
136136
const ws = new WebSocketPage(page)
@@ -153,7 +153,7 @@ test.describe('rum websockets', () => {
153153

154154
// This behavior might be updated when we're able to link the websocket connection with APM traces.
155155
createTest('does not collect websocket vital or resource when trackResources is false')
156-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'], trackResources: false })
156+
.withRum({ enableExperimentalFeatures: ['track_websockets'], trackResources: false })
157157
.withBody(WebSocketPage.testBody())
158158
.run(async ({ intakeRegistry, flushEvents, page }) => {
159159
const ws = new WebSocketPage(page)
@@ -171,7 +171,7 @@ test.describe('rum websockets', () => {
171171
})
172172

173173
createTest('websocket resource records different start and end views when it spanned multiple views')
174-
.withRum({ enableExperimentalFeatures: ['track_web_sockets'] })
174+
.withRum({ enableExperimentalFeatures: ['track_websockets'] })
175175
.withBody(WebSocketPage.testBody())
176176
.run(async ({ intakeRegistry, flushEvents, page }) => {
177177
const ws = new WebSocketPage(page)

0 commit comments

Comments
 (0)