Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/metrics/src/Metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,13 @@ class Metrics extends Utility implements MetricsInterface {
},
...this.defaultDimensions,
...this.dimensions,
// biome-ignore lint/performance/noAccumulatingSpread: need to merge all dimension sets
...this.dimensionSets.reduce((acc, dims) => Object.assign(acc, dims), {}),
// Merge all dimension sets efficiently by mutating the accumulator
...this.dimensionSets.reduce((acc, dims) => {
for (const [key, value] of Object.entries(dims)) {
acc[key] = value;
}
return acc;
}, {} as Dimensions),
...metricValues,
...this.metadata,
};
Expand Down
Loading