microsoft / applicationinsights-react-native

Microsoft Application Insights React Native Plugin
MIT License
13 stars 6 forks source link

AppInsights is initialized twice which causes react native app to crash #49

Open daidoo-mtn-gh opened 1 month ago

daidoo-mtn-gh commented 1 month ago

I am having a problem whereby appInsight is initialized twice in my react native app and it causes the app to crash

Can we have a check to determine if appInsight is already initialized. And or also, can we have a function that can manually destroy the instance created

Karlie-777 commented 1 month ago

you can call ai.core.isInitialized() or ai.appInsights.isInitialized() to get initialization status. And you can call ai.unload() to tear down any initialized instances.

daidoo-mtn-gh commented 1 month ago

@Karlie-777 , I will check it out, thank you