Skip to content

Commit 077209e

Browse files
nicohrubeccodex
andauthored
fix(core): Exclude release from SDK configuration reports (#26701)
## What Remove `release` from both the top-level experimental `sdk.config` payload and user-set options. Stacked on #26677. ## Why Release changes currently give otherwise identical SDK configurations different hashes. Omitting release lets those reports share a stored configuration across deployments while keeping the hash tied to the entire payload. Co-authored-by: Codex <codex@openai.com>
1 parent b79c5ab commit 077209e

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎packages/core/src/integrations/reportSdkConfig.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ function serialize(value: unknown, ancestors = new Set<object>()): unknown {
9595
}
9696

9797
// Integrations are reported at the top level; serverName would split configurations by host.
98-
const EXCLUDED_OPTIONS = new Set(['dsn', 'integrations', 'serverName']);
98+
const EXCLUDED_OPTIONS = new Set(['dsn', 'integrations', 'release', 'serverName']);
9999

100100
function buildConfigAttributes(client: Client): Record<string, string> {
101101
const { sdk, optionsSetByUser = [] } = client.getSdkMetadata() || {};
102102
const clientOptions = client.getOptions();
103-
const { release, environment, dist } = clientOptions;
103+
const { environment, dist } = clientOptions;
104104
const runtime = 'runtime' in clientOptions ? clientOptions.runtime : undefined;
105105

106106
// Only what the user passed, so SDK defaults never show up as config.
@@ -119,7 +119,6 @@ function buildConfigAttributes(client: Client): Record<string, string> {
119119
version: 3,
120120
sdk: serialize(sdk),
121121
runtime: serialize(runtime),
122-
release,
123122
environment,
124123
dist,
125124
integrations: client.getIntegrationNames().map(name => ({ name })),

‎packages/core/test/lib/integrations/reportSdkConfig.test.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ describe('experimentalReportSdkConfigIntegration', () => {
6666
version: 3,
6767
sdk: { name: 'sentry.javascript.node', version: '11.14.0' },
6868
runtime: { name: 'node', version: 'v24.22.1' },
69-
release: 'shop@1.4.2',
7069
environment: 'staging',
7170
dist: '42',
7271
integrations: [{ name: 'ExperimentalReportSdkConfig' }, { name: 'Tag' }],
7372
options: {
7473
runtime: { name: 'node', version: 'v24.22.1' },
75-
release: 'shop@1.4.2',
7674
environment: 'staging',
7775
dist: '42',
7876
defaultIntegrations: false,
@@ -87,14 +85,14 @@ describe('experimentalReportSdkConfigIntegration', () => {
8785
});
8886
const resolvedOptions = {
8987
runtime: { name: 'node', version: 'v24.22.1' },
90-
release: 'shop@1.4.2',
9188
environment: 'staging',
9289
dist: '42',
9390
};
9491

9592
const payload = reportConfig(
9693
getDefaultTestClientOptions({
9794
dsn: 'https://username@domain/123',
95+
release: 'shop@1.4.2',
9896
...resolvedOptions,
9997
...userOptions,
10098
}),

0 commit comments

Comments
 (0)