Skip to content

Commit 3f9220c

Browse files
committed
fix(profile): change platform to javascript
1 parent 3ec2c90 commit 3f9220c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/profiling-browser/src/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const THREAD_NAME = 'main';
1919
// Machine properties (eval only once)
2020
let OS_PLATFORM = ''; // macos
2121
let OS_PLATFORM_VERSION = ''; // 13.2
22-
let OS_ARCH = '';
23-
let OS_BROWSER = '';
22+
let OS_ARCH = ''; // arm64
23+
let OS_BROWSER = WINDOW.navigator && WINDOW.navigator.userAgent || '';
2424
let OS_MODEL = '';
2525
const OS_LOCALE =
2626
(WINDOW.navigator && WINDOW.navigator.language) || (WINDOW.navigator && WINDOW.navigator.languages[0]) || '';
@@ -251,13 +251,13 @@ export function createProfilingEventEnvelope(
251251
const profile: Profile = {
252252
event_id: rawProfile.profile_id,
253253
timestamp: new Date(transactionStartMs).toISOString(),
254-
platform: 'node', // @TODO replace with browser once backend supports it
254+
platform: 'javascript',
255255
version: '1',
256256
release: event.release || '',
257257
environment: event.environment || '',
258258
runtime: {
259-
name: 'node', // @TODO replace with browser once backend supports it
260-
version: '', // @TODO replace with browser once backend supports it
259+
name: 'javascript',
260+
version: WINDOW.navigator.userAgent
261261
},
262262
os: {
263263
name: OS_PLATFORM,

0 commit comments

Comments
 (0)