Skip to content

Fix(V7): missing ip settings from SDK package - #5137

Merged
lucas-zimerman merged 5 commits into
mainfrom
lz/fix-ip
Sep 3, 2025
Merged

Fix(V7): missing ip settings from SDK package#5137
lucas-zimerman merged 5 commits into
mainfrom
lz/fix-ip

Conversation

@lucas-zimerman

@lucas-zimermanlucas-zimerman commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

The change wasn't done automatically on JS V10 so we needed to copy what was implemented on JS V10 in order to fix the IP resolution.

Original Bump: #5093
Based on:
https://github.com/getsentry/sentry-lynx/blob/5d45c33eaefda526e649a1414f1f3ef2ad206262/packages/lynx-react/src/client.ts#L79-L84

Sample event with the new fix:
https://us.sentry.io/api/0/projects/sentry-sdks/sentry-react-native/events/de4d0214f8574ecda8313891527fd41c/json/

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@lucas-zimermanlucas-zimerman changed the title Fix deprecated ipFix(V7): missing ip settings from SDK packageSep 3, 2025
@lucas-zimerman
lucas-zimerman marked this pull request as ready for review September 3, 2025 09:33
@lucas-zimerman

Copy link
Copy Markdown
CollaboratorAuthor

@Lms24 Do we need to also patch sessions? our client uses this.on('beforeSendSession', addAutoIpAddressToSession); and that is not deprecated.

@github-actions

github-actionsBot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time369.57 ms363.35 ms-6.22 ms
Size17.75 MiB19.68 MiB1.93 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
c08359e421.87 ms445.37 ms23.50 ms
20daa0a359.51 ms374.90 ms15.39 ms
21c9e75450.39 ms452.92 ms2.53 ms
d916aa3425.37 ms427.02 ms1.65 ms
20d5eaa377.62 ms406.50 ms28.88 ms
7be1f99454.83 ms461.36 ms6.53 ms
64cd15c439.02 ms427.63 ms-11.39 ms
eb07ba3470.04 ms473.35 ms3.31 ms
534ba8c484.00 ms499.93 ms15.93 ms
c1573b3400.85 ms411.82 ms10.97 ms

App size

RevisionPlainWith SentryDiff
c08359e17.75 MiB20.15 MiB2.41 MiB
20daa0a17.75 MiB20.15 MiB2.41 MiB
21c9e7517.75 MiB20.15 MiB2.41 MiB
d916aa317.75 MiB20.15 MiB2.41 MiB
20d5eaa17.75 MiB20.15 MiB2.41 MiB
7be1f9917.75 MiB20.15 MiB2.41 MiB
64cd15c17.75 MiB20.15 MiB2.41 MiB
eb07ba317.75 MiB20.15 MiB2.41 MiB
534ba8c17.75 MiB20.15 MiB2.41 MiB
c1573b317.75 MiB20.15 MiB2.41 MiB

@github-actions

github-actionsBot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time1222.20 ms1225.64 ms3.43 ms
Size3.19 MiB4.44 MiB1.25 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
20d5eaa+dirty1224.67 ms1223.16 ms-1.51 ms
21c9e75+dirty1206.20 ms1223.54 ms17.35 ms
20daa0a+dirty1227.71 ms1233.72 ms6.01 ms
a0b15d6+dirty1213.79 ms1210.45 ms-3.34 ms
46bd012+dirty1231.78 ms1212.30 ms-19.47 ms
eb07ba3+dirty1214.49 ms1221.59 ms7.10 ms
bc9680d+dirty1228.57 ms1233.64 ms5.07 ms
3e0a5f9+dirty1233.65 ms1239.10 ms5.45 ms
d916aa3+dirty1211.02 ms1221.33 ms10.31 ms
7be1f99+dirty1222.43 ms1217.15 ms-5.28 ms

App size

RevisionPlainWith SentryDiff
20d5eaa+dirty3.19 MiB4.38 MiB1.19 MiB
21c9e75+dirty3.19 MiB4.38 MiB1.19 MiB
20daa0a+dirty3.19 MiB4.38 MiB1.19 MiB
a0b15d6+dirty3.19 MiB4.38 MiB1.19 MiB
46bd012+dirty3.19 MiB4.38 MiB1.19 MiB
eb07ba3+dirty3.19 MiB4.38 MiB1.19 MiB
bc9680d+dirty3.19 MiB4.38 MiB1.19 MiB
3e0a5f9+dirty3.19 MiB4.38 MiB1.19 MiB
d916aa3+dirty3.19 MiB4.38 MiB1.19 MiB
7be1f99+dirty3.19 MiB4.38 MiB1.19 MiB

@github-actions

github-actionsBot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time1221.57 ms1216.32 ms-5.25 ms
Size2.63 MiB3.87 MiB1.24 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
20d5eaa+dirty1231.12 ms1226.00 ms-5.12 ms
21c9e75+dirty1237.78 ms1247.66 ms9.88 ms
20daa0a+dirty1233.12 ms1233.35 ms0.22 ms
a0b15d6+dirty1220.18 ms1223.18 ms3.00 ms
46bd012+dirty1220.49 ms1226.89 ms6.40 ms
eb07ba3+dirty1222.46 ms1220.37 ms-2.08 ms
bc9680d+dirty1221.41 ms1241.47 ms20.06 ms
3e0a5f9+dirty1226.94 ms1230.02 ms3.08 ms
d916aa3+dirty1221.02 ms1228.98 ms7.96 ms
7be1f99+dirty1226.69 ms1217.76 ms-8.93 ms

App size

RevisionPlainWith SentryDiff
20d5eaa+dirty2.63 MiB3.81 MiB1.18 MiB
21c9e75+dirty2.63 MiB3.81 MiB1.18 MiB
20daa0a+dirty2.63 MiB3.81 MiB1.18 MiB
a0b15d6+dirty2.63 MiB3.81 MiB1.18 MiB
46bd012+dirty2.63 MiB3.81 MiB1.18 MiB
eb07ba3+dirty2.63 MiB3.81 MiB1.18 MiB
bc9680d+dirty2.63 MiB3.81 MiB1.18 MiB
3e0a5f9+dirty2.63 MiB3.81 MiB1.18 MiB
d916aa3+dirty2.63 MiB3.81 MiB1.18 MiB
7be1f99+dirty2.63 MiB3.81 MiB1.18 MiB

Comment threadCHANGELOG.md

@antonisantonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎸
Thank you for fixing this so quickly @lucas-zimerman 🙇

Should we wait for a response before merging?

Comment threadCHANGELOG.md Outdated
Comment threadCHANGELOG.md
@lucas-zimerman

Copy link
Copy Markdown
CollaboratorAuthor

LGTM 🎸 Thank you for fixing this so quickly @lucas-zimerman 🙇

Should we wait for a response before merging?

ATM we follow the implementation of sentry browser https://github.com/getsentry/sentry-javascript/blob/84243e62101f37164d1917acfccda80dc6d5b923/packages/browser/src/client.ts#L127-L130
So I'd say it's safe to merge. If it also requires any changes, we can do it as a follow-up fix. (My gut feelings says it's ok to leave that feature as is since the user IP is not exposed to the clients and is only used for counting the amount of users).

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this so quickly!

We can leave the session stuff as-is, since session envelopes never had the same problem on the Relay side as event envelopes. So they're not affected and IP inferral should already work as expected.

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time347.88 ms396.12 ms48.25 ms
Size7.15 MiB8.41 MiB1.26 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
c08359e+dirty406.04 ms428.87 ms22.83 ms
64cd15c+dirty488.79 ms483.54 ms-5.24 ms
a02e30b+dirty346.13 ms381.76 ms35.62 ms
bc9680d+dirty346.77 ms463.48 ms116.71 ms
46bd012+dirty333.76 ms359.24 ms25.48 ms
3e0a5f9+dirty379.92 ms450.96 ms71.04 ms
98f632c+dirty323.98 ms375.39 ms51.41 ms
e2fa43d+dirty326.56 ms372.88 ms46.32 ms
a0b15d6+dirty414.33 ms448.85 ms34.52 ms
785ffb1+dirty380.65 ms451.83 ms71.18 ms

App size

RevisionPlainWith SentryDiff
c08359e+dirty7.15 MiB8.42 MiB1.27 MiB
64cd15c+dirty7.15 MiB8.42 MiB1.27 MiB
a02e30b+dirty7.15 MiB8.42 MiB1.27 MiB
bc9680d+dirty7.15 MiB8.42 MiB1.27 MiB
46bd012+dirty7.15 MiB8.42 MiB1.27 MiB
3e0a5f9+dirty7.15 MiB8.42 MiB1.27 MiB
98f632c+dirty7.15 MiB8.42 MiB1.27 MiB
e2fa43d+dirty7.15 MiB8.42 MiB1.27 MiB
a0b15d6+dirty7.15 MiB8.42 MiB1.27 MiB
785ffb1+dirty7.15 MiB8.42 MiB1.27 MiB

@lucas-zimerman
lucas-zimerman merged commit a8caa5e into mainSep 3, 2025
73 checks passed
@lucas-zimerman
lucas-zimerman deleted the lz/fix-ip branch September 3, 2025 11:47
Sign up for freeto 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.

3 participants

@lucas-zimerman@antonis@Lms24