Skip to content

Commit 6f3560c

Browse files
committed
Use '.' for param so it renders more nicely in the log attribute tree structure
1 parent 301a1ca commit 6f3560c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/log.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function valueToAttribute(key: string, value: unknown): LogAttribute {
7575
default:
7676
return {
7777
key,
78-
value: { stringValue: JSON.stringify(value) ?? "" },
78+
value: { stringValue: JSON.stringify(value) ?? '' },
7979
};
8080
}
8181
}
@@ -118,11 +118,11 @@ export function sendLog(level: LogSeverityLevel, messageArr: TemplateStringsArra
118118

119119
const attributes = values.reduce<Record<string, unknown>>(
120120
(acc, value, index) => {
121-
acc[`param${index}`] = value;
121+
acc[`param.${index}`] = value;
122122
return acc;
123123
},
124124
{
125-
'sentry.template': messageArr.map((s, i) => s + (i < messageArr.length - 1 ? `$param${i}` : '')).join(''),
125+
'sentry.template': messageArr.map((s, i) => s + (i < messageArr.length - 1 ? `$param.${i}` : '')).join(''),
126126
},
127127
);
128128

0 commit comments

Comments
 (0)