Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datadog integration #1847

Merged
merged 10 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ DEFAULT_SERVER=
PRIMARY_COLOR=
SMARTLOOK_PROJECT_KEY=
DEBUG_REDUX_LOGGER_LEVEL=log
DATADOG_ENABLED=0
DATADOG_CLIENT_TOKEN=
DATADOG_APPLICATION_ID=
5 changes: 5 additions & 0 deletions .github/workflows/fastlane_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ jobs:
- name: Create .env file
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
GOOGLE_MAPS_BROWSER_KEY: ${{ secrets.GOOGLE_MAPS_BROWSER_KEY }}
GOOGLE_MAPS_ANDROID_KEY: ${{ secrets.GOOGLE_MAPS_ANDROID_KEY }}
TRANSISTORSOFT_LICENSE_KEY: ${{ secrets.TRANSISTORSOFT_LICENSE_KEY }}
Expand All @@ -104,6 +106,9 @@ jobs:
echo COUNTLY_APP_KEY= >> .env
echo COUNTLY_SALT= >> .env
echo SENTRY_DSN="$SENTRY_DSN" >> .env
echo DATADOG_ENABLED="1" >> .env
echo DATADOG_CLIENT_TOKEN="$DATADOG_CLIENT_TOKEN" >> .env
echo DATADOG_APPLICATION_ID="$DATADOG_APPLICATION_ID" >> .env
echo GOOGLE_MAPS_BROWSER_KEY="$GOOGLE_MAPS_BROWSER_KEY" >> .env
echo GOOGLE_MAPS_ANDROID_KEY="$GOOGLE_MAPS_ANDROID_KEY" >> .env
echo TRANSISTORSOFT_LICENSE_KEY="$TRANSISTORSOFT_LICENSE_KEY" >> .env
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/fastlane_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
- name: Create .env file
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }}
DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }}
GOOGLE_MAPS_BROWSER_KEY: ${{ secrets.GOOGLE_MAPS_BROWSER_KEY }}
GOOGLE_MAPS_ANDROID_KEY: ${{ secrets.GOOGLE_MAPS_ANDROID_KEY }}
TRANSISTORSOFT_LICENSE_KEY: ${{ secrets.TRANSISTORSOFT_LICENSE_KEY }}
Expand All @@ -97,6 +99,9 @@ jobs:
echo COUNTLY_APP_KEY= >> .env
echo COUNTLY_SALT= >> .env
echo SENTRY_DSN="$SENTRY_DSN" >> .env
echo DATADOG_ENABLED="1" >> .env
echo DATADOG_CLIENT_TOKEN="$DATADOG_CLIENT_TOKEN" >> .env
echo DATADOG_APPLICATION_ID="$DATADOG_APPLICATION_ID" >> .env
echo GOOGLE_MAPS_BROWSER_KEY="$GOOGLE_MAPS_BROWSER_KEY" >> .env
echo GOOGLE_MAPS_ANDROID_KEY="$GOOGLE_MAPS_ANDROID_KEY" >> .env
echo TRANSISTORSOFT_LICENSE_KEY="$TRANSISTORSOFT_LICENSE_KEY" >> .env
Expand Down
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode 213
versionName "2.22.0"
// No need to increment the versionCode, it will be automatically incremented by the fastlane
versionCode 215
versionName "2.24.0"

manifestPlaceholders = [
tipsiStripeRedirectScheme: "coopcycle",
Expand Down
2 changes: 1 addition & 1 deletion ios/CoopCycle/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.22.0</string>
<string>2.24.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
47 changes: 47 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@ PODS:
- React
- CountlyReactNative/NotificationService (22.06.1):
- React
- DatadogCore (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogCrashReporting (2.14.2):
- DatadogInternal (= 2.14.2)
- PLCrashReporter (~> 1.11.2)
- DatadogInternal (2.14.2)
- DatadogLogs (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogRUM (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogSDKReactNative (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- React-Core
- DatadogTrace (2.14.2):
- DatadogInternal (= 2.14.2)
- OpenTelemetrySwiftApi (= 1.6.0)
- DatadogWebViewTracking (2.14.2):
- DatadogInternal (= 2.14.2)
- DoubleConversion (1.1.6)
- EXConstants (15.4.5):
- ExpoModulesCore
Expand Down Expand Up @@ -191,6 +214,8 @@ PODS:
- nanopb/encode (= 2.30909.1)
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- OpenTelemetrySwiftApi (1.6.0)
- PLCrashReporter (1.11.2)
- PromisesObjC (2.4.0)
- PromisesSwift (2.4.0):
- PromisesObjC (= 2.4.0)
Expand Down Expand Up @@ -1401,6 +1426,7 @@ PODS:
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- CountlyReactNative (from `../node_modules/countly-sdk-react-native-bridge`)
- "DatadogSDKReactNative (from `../node_modules/@datadog/mobile-react-native`)"
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- EXFont (from `../node_modules/expo-font/ios`)
Expand Down Expand Up @@ -1501,6 +1527,13 @@ SPEC REPOS:
trunk:
- AppAuth
- CocoaLumberjack
- DatadogCore
- DatadogCrashReporting
- DatadogInternal
- DatadogLogs
- DatadogRUM
- DatadogTrace
- DatadogWebViewTracking
- FBAEMKit
- FBSDKCoreKit
- FBSDKCoreKit_Basics
Expand All @@ -1525,6 +1558,8 @@ SPEC REPOS:
- IQKeyboardManagerSwift
- libevent
- nanopb
- OpenTelemetrySwiftApi
- PLCrashReporter
- PromisesObjC
- PromisesSwift
- Sentry
Expand All @@ -1545,6 +1580,8 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
CountlyReactNative:
:path: "../node_modules/countly-sdk-react-native-bridge"
DatadogSDKReactNative:
:path: "../node_modules/@datadog/mobile-react-native"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXConstants:
Expand Down Expand Up @@ -1734,6 +1771,14 @@ SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
CountlyReactNative: f544f34347bc635e2951e2797d4750e66f886a09
DatadogCore: a3429f62b7da0e715e179833b3daa0203ba2a5ad
DatadogCrashReporting: 3b5e496c1f61971a93b9a1bff3312297be03f031
DatadogInternal: 11798eea970f195ad720168f9a51712e71affe33
DatadogLogs: 4192cc1979467ce0c2521d73ba92b6197e0c7f06
DatadogRUM: f732009eba7a848d6e2df9ef12944e30f0e94ba2
DatadogSDKReactNative: f418f95923dc78ad7b4dcd1710804f1672d8abfa
DatadogTrace: 5687191622d91152f10616e206500fe5acd8a342
DatadogWebViewTracking: cb818ee5943de63940b4f536320361c17af0f7b1
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
EXConstants: 988aa430ca0f76b43cd46b66e7fae3287f9cc2fc
EXFont: f20669cb266ef48b004f1eb1f2b20db96cd1df9f
Expand Down Expand Up @@ -1771,6 +1816,8 @@ SPEC CHECKSUMS:
IQKeyboardManagerSwift: 12d89768845bb77b55cc092ecc2b1f9370f06b76
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
OpenTelemetrySwiftApi: 657da8071c2908caecce11548e006f779924ff9c
PLCrashReporter: 499c53b0104f95c302d94fd723ebb03c56d9bac8
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
},
"dependencies": {
"@babel/helper-get-function-arity": "^7.16.7",
"@datadog/mobile-react-native": "^2.4.3",
"@datadog/mobile-react-navigation": "^2.4.3",
"@heasy/react-native-sunmi-printer": "git+https://github.com/Surile/react-native-sunmi-printer.git#666f6f76ce737faf7a500b88a08ad10da68c5967",
"@invertase/react-native-apple-authentication": "^2.2.2",
"@mapbox/polyline": "^1.1.1",
Expand Down
70 changes: 37 additions & 33 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import {
AccountResetPasswordNewPasswordScreen,
} from './navigation/navigators/AccountNavigator';
import { nativeBaseTheme } from './styles/theme';
import { DatadogWrapper, navigationContainerOnReady } from './Datadog';

LogBox.ignoreLogs([
'Warning: isMounted(...) is deprecated in plain JavaScript React classes.',
Expand All @@ -86,6 +87,7 @@ function getCurrentRouteName() {

function onReady() {
routeNameRef.current = getCurrentRouteName();
navigationContainerOnReady(navigationRef);
}

/**
Expand Down Expand Up @@ -143,39 +145,41 @@ const App = () => {
}, []);

return (
<NativeBaseProvider theme={nativeBaseTheme}>
<RootView>
<Provider store={store}>
<PersistGate
loading={
<FullScreenLoadingIndicator debugHint="Initialising the Redux state ..." />
}
persistor={persistor}>
<I18nextProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
<SafeAreaProvider>
<Spinner />
<NavigationContainer
ref={navigationRef}
linking={linking}
onReady={onReady}
onStateChange={onNavigationStateChange}
theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Root />
</NavigationContainer>
<DropdownAlert
ref={ref => {
DropdownHolder.setDropdown(ref);
}}
/>
<NotificationHandler />
</SafeAreaProvider>
</QueryClientProvider>
</I18nextProvider>
</PersistGate>
</Provider>
</RootView>
</NativeBaseProvider>
<DatadogWrapper>
<NativeBaseProvider theme={nativeBaseTheme}>
<RootView>
<Provider store={store}>
<PersistGate
loading={
<FullScreenLoadingIndicator debugHint="Initialising the Redux state ..." />
}
persistor={persistor}>
<I18nextProvider i18n={i18n}>
<QueryClientProvider client={queryClient}>
<SafeAreaProvider>
<Spinner />
<NavigationContainer
ref={navigationRef}
linking={linking}
onReady={onReady}
onStateChange={onNavigationStateChange}
theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Root />
</NavigationContainer>
<DropdownAlert
ref={ref => {
DropdownHolder.setDropdown(ref);
}}
/>
<NotificationHandler />
</SafeAreaProvider>
</QueryClientProvider>
</I18nextProvider>
</PersistGate>
</Provider>
</RootView>
</NativeBaseProvider>
</DatadogWrapper>
);
};

Expand Down
Loading
Loading