Skip to content

Commit f14e402

Browse files
committed
push new tags onto existing array
1 parent 56f21e4 commit f14e402

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/metrics/enhanced-metrics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ export function getRuntimeTag(): string | null {
5050
}
5151

5252
export function getEnhancedMetricTags(context?: Context): string[] {
53-
let tags: string[] = [];
53+
const tags: string[] = [];
5454
if (context) {
5555
let arnTags = [`functionname:${context.functionName}`];
5656
if (context.invokedFunctionArn) {
5757
arnTags = parseTagsFromARN(context.invokedFunctionArn, context.functionVersion);
5858
}
59-
tags = [...arnTags, `memorysize:${context.memoryLimitInMB}`];
59+
tags.push(...arnTags, `memorysize:${context.memoryLimitInMB}`);
6060
}
6161

6262
tags.push(...getSandboxInitTags(), getVersionTag());

0 commit comments

Comments
 (0)