Skip to content

Commit 34c6219

Browse files
cleptricAbhiPrasad
andauthored
Update packages/core/src/metrics/metric-summary.ts
Co-authored-by: Abhijeet Prasad <[email protected]>
1 parent 9fe0359 commit 34c6219

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/metrics/metric-summary.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export function getMetricSummaryJsonForSpan(span: Span): Record<string, Array<Me
2929
const output: Record<string, Array<MetricSummary>> = {};
3030

3131
for (const [, [exportKey, summary]] of storage) {
32-
output[exportKey] = [...(output[exportKey] || []), dropUndefinedKeys(summary)];
32+
if (!output[exportKey]) {
33+
output[exportKey] = [];
34+
}
35+
36+
output[exportKey].push(dropUndefinedKeys(summary));
3337
}
3438

3539
return output;

0 commit comments

Comments
 (0)