Skip to content

Conversation

lucas-zimerman
Copy link
Collaborator

Based on getsentry/sentry-javascript#17364

original context;

This PR fixes a long-standing problem in the SDK where it would set incorrect information about when Relay should (not) infer IP addresses from sent envelope requests.

Previously, this was thought to be controlled by setting event.user.ip_address: '{{auto}}'. However, after an incident in Relay, it was determined that this is in fact not a reliably way to control IP inference. Instead, SDKs should set event.sdk.settings.infer_ip: 'auto' | 'never' (see closes https://github.com/getsentry/sentry-javascript/issues/16252).
Unfortunately, this wasn't implemented immediately but is taken care of in this PR.

(FWIW, the only reason why Relay continued to infer IP addresses for the JS SDK was because it is excempt from logic that would infer IP addresses only if user.ip_address was set to '{{auto}}'. This is necessary to backwards compatibility with older SDKs.)

Follow-ups: We likely also need to adjust the logic in Electron and Lynx (at the very least remove setting user.ip_address).

closes https://github.com/getsentry/sentry-javascript/issues/17351
closes https://github.com/getsentry/sentry-javascript/issues/16252

Instead of bumping o V10, the fix was patched on the current release.

@lucas-zimerman lucas-zimerman changed the title Lz/fiz v7 ip Fix(V7): missing ip settings from SDK package Aug 20, 2025
@lucas-zimerman lucas-zimerman changed the base branch from main to v7 August 20, 2025 15:55
Copy link
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 334.57 ms 406.30 ms 71.73 ms
Size 7.15 MiB 8.37 MiB 1.22 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
0e27665+dirty 355.91 ms 422.52 ms 66.61 ms
7eff2d7+dirty 393.13 ms 426.77 ms 33.65 ms
f870f2d+dirty 398.49 ms 434.24 ms 35.75 ms
26515b5+dirty 389.83 ms 443.94 ms 54.11 ms
472960b+dirty 394.39 ms 376.18 ms -18.20 ms
11cc947+dirty 385.96 ms 420.08 ms 34.12 ms
20d0171+dirty 380.17 ms 422.57 ms 42.40 ms
c26618b+dirty 354.44 ms 414.73 ms 60.29 ms
10ec2e1+dirty 373.87 ms 443.64 ms 69.78 ms
3c99746+dirty 400.65 ms 399.59 ms -1.06 ms

App size

Revision Plain With Sentry Diff
0e27665+dirty 7.15 MiB 8.35 MiB 1.20 MiB
7eff2d7+dirty 7.15 MiB 8.35 MiB 1.20 MiB
f870f2d+dirty 7.15 MiB 8.34 MiB 1.18 MiB
26515b5+dirty 7.15 MiB 8.36 MiB 1.21 MiB
472960b+dirty 7.15 MiB 8.34 MiB 1.18 MiB
11cc947+dirty 7.15 MiB 8.36 MiB 1.20 MiB
20d0171+dirty 7.15 MiB 8.35 MiB 1.20 MiB
c26618b+dirty 7.15 MiB 8.36 MiB 1.20 MiB
10ec2e1+dirty 7.15 MiB 8.35 MiB 1.20 MiB
3c99746+dirty 7.15 MiB 8.34 MiB 1.18 MiB

Copy link
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1229.88 ms 1232.58 ms 2.71 ms
Size 3.19 MiB 4.39 MiB 1.20 MiB

Baseline results on branch: v7

Startup times

Revision Plain With Sentry Diff
c26618b+dirty 1228.54 ms 1236.52 ms 7.98 ms
0e27665+dirty 1207.12 ms 1220.33 ms 13.20 ms
20d0171+dirty 1214.21 ms 1220.31 ms 6.10 ms
472960b+dirty 1243.67 ms 1233.57 ms -10.11 ms
26515b5+dirty 1216.98 ms 1224.24 ms 7.27 ms
fb47c4a+dirty 1243.40 ms 1245.86 ms 2.46 ms
7eff2d7+dirty 1224.84 ms 1227.94 ms 3.10 ms
11cc947+dirty 1218.92 ms 1234.24 ms 15.33 ms
10ec2e1+dirty 1229.04 ms 1222.28 ms -6.76 ms
3c99746+dirty 1227.65 ms 1228.81 ms 1.16 ms

App size

Revision Plain With Sentry Diff
c26618b+dirty 3.19 MiB 4.39 MiB 1.20 MiB
0e27665+dirty 3.19 MiB 4.37 MiB 1.18 MiB
20d0171+dirty 3.19 MiB 4.37 MiB 1.18 MiB
472960b+dirty 3.19 MiB 4.36 MiB 1.17 MiB
26515b5+dirty 3.19 MiB 4.39 MiB 1.20 MiB
fb47c4a+dirty 3.19 MiB 4.37 MiB 1.18 MiB
7eff2d7+dirty 3.19 MiB 4.36 MiB 1.17 MiB
11cc947+dirty 3.19 MiB 4.39 MiB 1.20 MiB
10ec2e1+dirty 3.19 MiB 4.39 MiB 1.20 MiB
3c99746+dirty 3.19 MiB 4.35 MiB 1.16 MiB

@lucas-zimerman lucas-zimerman marked this pull request as ready for review August 25, 2025 14:50
@lucas-zimerman
Copy link
Collaborator Author

iOS errors are from v7 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant