Skip to content

Commit b4ef25d

Browse files
authored
fix(core): Prefix release and environment correctly (#15999)
fixes https://linear.app/getsentry/issue/LOGS-5 previously I wasn't matching the spec, this fixes that.
1 parent 6b73178 commit b4ef25d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/src/logs/exports.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ export function _INTERNAL_captureLog(
9797
};
9898

9999
if (release) {
100-
logAttributes.release = release;
100+
logAttributes['sentry.release'] = release;
101101
}
102102

103103
if (environment) {
104-
logAttributes.environment = environment;
104+
logAttributes['sentry.environment'] = environment;
105105
}
106106

107107
if (isParameterizedString(message)) {

packages/core/test/lib/logs/exports.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ describe('_INTERNAL_captureLog', () => {
136136
const logAttributes = _INTERNAL_getLogBuffer(client)?.[0]?.attributes;
137137
expect(logAttributes).toEqual(
138138
expect.arrayContaining([
139-
expect.objectContaining({ key: 'release', value: { stringValue: '1.0.0' } }),
140-
expect.objectContaining({ key: 'environment', value: { stringValue: 'test' } }),
139+
expect.objectContaining({ key: 'sentry.release', value: { stringValue: '1.0.0' } }),
140+
expect.objectContaining({ key: 'sentry.environment', value: { stringValue: 'test' } }),
141141
]),
142142
);
143143
});

0 commit comments

Comments
 (0)