Skip to content

Commit f00464a

Browse files
committed
Push new summaries instead of overwriting them
1 parent b72bf85 commit f00464a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ function getMetricStorageForSpan(span: Span): MetricSummaryStorage | undefined {
2020
/**
2121
* Fetches the metric summary if it exists for the passed span
2222
*/
23-
export function getMetricSummaryJsonForSpan(span: Span): Record<string, MetricSummary> | undefined {
23+
export function getMetricSummaryJsonForSpan(span: Span): Record<string, Array<MetricSummary>> | undefined {
2424
const storage = getMetricStorageForSpan(span);
2525

2626
if (!storage) {
2727
return undefined;
2828
}
29-
const output: Record<string, MetricSummary> = {};
29+
const output: Record<string, Array<MetricSummary>> = {};
3030

3131
for (const [, [exportKey, summary]] of storage) {
32-
output[exportKey] = dropUndefinedKeys(summary);
32+
output[exportKey].push(dropUndefinedKeys(summary));
3333
}
3434

3535
return output;

0 commit comments

Comments
 (0)