-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
36 lines (32 loc) · 1.04 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import {ReactNativeManualDevicePlugin} from '@microsoft/applicationinsights-react-native/dist-esm/manualIndex';
var RNPlugin = new ReactNativeManualDevicePlugin();
var appInsights = new ApplicationInsights({
config: {
disableDeviceCollection: true,
instrumentationKey: '814a172a-92fd-4950-9023-9cf13bb65696',
extensions: [RNPlugin]
}
});
appInsights.loadAppInsights();
appInsights.trackPageView();
appInsights.trackEvent({name: 'some event'});
console.log("current app", appInsights.context);
export default function App() {
return (
<View style={styles.container}>
<Text>-------- Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});