Skip to content

Commit 493f7b0

Browse files
authored
Merge pull request #34 from cryspen/wysiwys/bugfix-numeric-types
bugfix for handling of numeric metadata values
2 parents d82b77f + db8c6fc commit 493f7b0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/default_index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@
201201
// build the key from the values in the schema
202202
let key = {};
203203
for (const s of schema) {
204-
key[s] = benchItem[s];
204+
let value = benchItem[s];
205+
if (typeof value === 'number') {
206+
value = value.toString();
207+
}
208+
key[s] = value;
205209
}
206210

207211
return JSON.stringify(key);
@@ -341,7 +345,11 @@
341345
function buildTraceGroupKey(trace, groupBy) {
342346
const traceGroup = {};
343347
for (let key of groupBy) {
344-
traceGroup[key] = trace.metadata[key];
348+
let value = trace.metadata[key];
349+
if (typeof value === 'number') {
350+
value = value.toString();
351+
}
352+
traceGroup[key] = value;
345353
}
346354
return JSON.stringify(traceGroup);
347355
}

0 commit comments

Comments
 (0)