Skip to content

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 20, 2025

#skip-changelog
Changelog entry is created in #4277
Parts of this PR are replaced in #4277 too

📜 Description

  • Add package info including version earlier (static block, companion object init)
  • On init check package info for mixed versions and NoOp (do not init) if detected

💡 Motivation and Context

Step 2 of solving #4132

💚 How did you test it?

📝 Checklist

  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against cf1b57b

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 436.19 ms 505.10 ms 68.91 ms
Size 1.58 MiB 2.22 MiB 653.15 KiB

Previous results on branch: feat/noop-on-mixed-versions-android

Startup times

Revision Plain With Sentry Diff
995f145 413.38 ms 490.31 ms 76.94 ms
d378e33 434.77 ms 485.37 ms 50.60 ms
d0ff1c3 445.58 ms 509.68 ms 64.10 ms

App size

Revision Plain With Sentry Diff
995f145 1.58 MiB 2.21 MiB 647.55 KiB
d378e33 1.58 MiB 2.21 MiB 647.55 KiB
d0ff1c3 1.58 MiB 2.21 MiB 647.55 KiB

.log(
SentryLevel.ERROR,
"Not initializing Sentry because mixed SDK versions have been detected.");
return false;
Copy link
Member Author

@adinauer adinauer Mar 24, 2025

Choose a reason for hiding this comment

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

Changed in #4277 to cause an exception instead.

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

LGTM, but do you want to remove the calls to addPackage from ctors/registers? I guess at this point they are all redundant

@adinauer
Copy link
Member Author

do you want to remove the calls to addPackage from ctors/registers? I guess at this point they are all redundant

Yeah I can follow up with another PR to remove those.

@adinauer
Copy link
Member Author

Removed duplicate calls to addPackage in #4285

Base automatically changed from feat/detect-mixed-sdk-versions to main March 27, 2025 10:29
@adinauer adinauer merged commit 0a04d7f into main Mar 27, 2025
33 of 35 checks passed
@adinauer adinauer deleted the feat/noop-on-mixed-versions-android branch March 27, 2025 11:14
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.

5 participants