Skip to content

Commit 57c7c32

Browse files
dashedlobsterkatie
authored andcommitted
feat(tracing): Add GB unit to device memory tag value (#4935)
Since tag values are always strings, it'll be useful to attach units to the `deviceMemory` tag. Since `navigator.deviceMemory` are approximate in gigabytes, we can suffix the tag value with " GB". Reference: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory
1 parent 412c6ec commit 57c7c32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/tracing/src/browser/metrics.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class MetricsInstrumentation {
211211
}
212212

213213
if (isMeasurementValue(navigator.deviceMemory)) {
214-
transaction.setTag('deviceMemory', String(navigator.deviceMemory));
214+
transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);
215215
}
216216

217217
if (isMeasurementValue(navigator.hardwareConcurrency)) {

0 commit comments

Comments
 (0)