Skip to content

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Dec 16, 2021

📜 Description

Fix: Make App start cold/warm visible to Hybrid SDKs

💡 Motivation and Context

getsentry/sentry-react-native#1968
React native reads the Cold or Warm start from the Android SDK, but the Android SDK only sets it if performance is enabled on the Android SDK as well, by default, performance is not enabled, only on the RN SDK, hence we have to flip the flag anyway, even if performance is disabled on the Android SDK.

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps


@Nullable
synchronized Long getAppStartInterval() {
public synchronized Long getAppStartInterval() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@romtsn
Copy link
Member

romtsn commented Dec 16, 2021

LGTM, but wouldn't it be better to propagate the performanceEnabled flag from the hybrid SDKs rather? If they are utilising native SDKs for perf anyway

@marandaneto
Copy link
Contributor Author

LGTM, but wouldn't it be better to propagate the performanceEnabled flag from the hybrid SDKs rather? If they are utilising native SDKs for perf anyway

no, we've decided that users would need to enable that manually if they want to, most hybrid apps don't do "native screens" so it'd not make much sense anyway.

@marandaneto marandaneto merged commit c8578f7 into main Dec 16, 2021
@marandaneto marandaneto deleted the fix/app-start-hybridapp branch December 16, 2021 12:05
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.

2 participants