-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Describe the issue
I don't see any logs posted in my terminal regarding datadog in the terminal nor in the datadog dashboard. I can see a couple of warnings regarding datadog but other than nothing.

WARN Possible Unhandled Promise Rejection (id: 0): TypeError: undefined is not an object (evaluating 'features.firstPartyHosts') addDefaultValuesToAutoInstrumentationConfiguration@http://localhost:8081/index.bundle:340121:32 _enableFeaturesFromDatadogProvider$@http://localhost:8081/index.bundle:340326:135 tryCatch@http://localhost:8081/index.bundle:24192:23
WARN Require cycle: node_modules/@datadog/mobile-react-native/src/DatadogProvider/Buffer/BufferSingleton.ts -> node_modules/@datadog/mobile-react-native/src/DatadogProvider/Buffer/BoundedBuffer.ts -> node_modules/@datadog/mobile-react-native/src/foundation.tsx -> node_modules/@datadog/mobile-react-native/src/DatadogProvider/Buffer/bufferNativeCall.ts -> node_modules/@datadog/mobile-react-native/src/DatadogProvider/Buffer/BufferSingleton.ts
Here's the code that I have used
import {DatadogConfig} from './App/Config/DatadogConfig'
import {DatadogProvider} from '@datadog/mobile-react-native'
class App extends Component {
render() {
if (!this.state.isInited) {
return <SafeModeComponent onInit={this.init} />
}
return (
<DatadogProvider config={DatadogConfig}>
<OrientationContextProvider>
<PermissionsHandler
onTrackingPermission={() => {
CrashService.init()
}}
/>
<Provider store={this.store}>
<PersistGate loading={this.loader()} persistor={this.persistor}>
<AnalyticsProvider client={SegmentService.client}>
<RootContainer />
</AnalyticsProvider>
</PersistGate>
</Provider>
</OrientationContextProvider>
</DatadogProvider>
)
}
}
And my DatadogConfig file
import {
BatchSize,
DatadogProviderConfiguration,
SdkVerbosity,
UploadFrequency,
} from "@datadog/mobile-react-native";
import AppConfig from './AppConfig'
import {DATADOG_CONFIG} from '../Constants/Constants'
const environment = AppConfig.selectedServer
export const DatadogConfig = new DatadogProviderConfiguration(
DATADOG_CONFIG.CLIENT_TOKEN,
environment,
DATADOG_CONFIG.APPLICATION_ID,
true, // Track user interactions (such as a tap on buttons).
true, // Track XHR resources
true // Track errors
);
// Optional: Select your Datadog website (one of "US1", "EU1", "US3", "US5", "AP1" or "GOV")
DatadogConfig.site = "US3"
// Optional: Enable JavaScript long task collection
DatadogConfig.longTaskThresholdMs = 100
// Optional: enable or disable native crash reports
DatadogConfig.nativeCrashReportEnabled = true
// Optional: sample RUM sessions (here, 100% of session will be sent to Datadog. Default = 100%. Only tracked sessions send RUM events.)
DatadogConfig.sessionSamplingRate = 100
if (__DEV__) {
// Optional: Send data more frequently
DatadogConfig.uploadFrequency = UploadFrequency.FREQUENT
// Optional: Send smaller batches of data
DatadogConfig.batchSize = BatchSize.SMALL
// Optional: Enable debug logging
DatadogConfig.verbosity = SdkVerbosity.DEBUG
}
Added the navigation code in the navigation
import { DdRumReactNavigationTracking } from "@datadog/mobile-react-navigation";
<NavigationContainer
ref={navigationRef}
onReady={() => {
DdRumReactNavigationTracking.startTrackingViews(navigationRef.current)
isReadyRef.current = true
routeNameRef.current = navigationRef.current.getCurrentRoute().name
}}
Reproduction steps
- Install 1.2.0 of @datadog/mobile-react-native"
- Follow the installation steps mentioned in Application Management of Datadog dashboard
- And run the app and no logs are pushed to datadog in terminal or in console
SDK logs
No response
Device Information
No response
SDK version
1.2.0
Integration Methods
Yarn
React Native Version
0.67.2
Package.json Contents
{
"name": "leonardo_app_react",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android --variant leonardoDebug",
"android_release": "react-native run-android --variant leonardoRelease",
"android_fpi": "react-native run-android --variant fpiRiskDebug",
"android_fpi_release": "react-native run-android --variant fpiRiskRelease",
"ios": "npx react-native run-ios --scheme leonardo_app_react",
"ios_release": "npx react-native run-ios --configuration Release",
"ios_fpi": "npx react-native run-ios --scheme fpi_risk",
"build": "yarn && cd ios/ && pod install --repo-update",
"start": "npx react-native start",
"test": "jest",
"devices_ios": "xcrun simctl list devices",
"devices_android": "adb devices",
"jetify": "npx jetify",
"postinstall": "patch-package",
"clean": "watchman watch-del-all && rm -rf node_modules/ && rm -rf /tmp/metro-bundler-cache-* && rm -rf /tmp/haste-map-react-native-packager-* && yarn && cd ios && rm -rf Pods && rm -rf Podfile.lock && npx pod-install && xcodebuild clean && cd ../ && cd android && ./gradlew clean",
"record_test": "detox recorder --bundleId 'com.webpartners.Leonardo' --simulatorId booted --outputTestFile '~/Desktop/RecordedTest.js' --testName 'My Recorded Test' --record",
"android_log": "adb logcat *:S ReactNative:V ReactNativeJS:V",
"build_test_ios": "detox build --configuration ios.sim.debug",
"build_test_ios_release": "detox build --configuration ios.sim.release",
"test_ios": "detox test --configuration ios.sim.debug",
"test_ios_release": "detox test --configuration ios.sim.release",
"build_test_android": "detox build --configuration android.sim.debug",
"build_test_android_release": "detox build --configuration android.sim.release",
"test_android": "detox test --configuration android.sim.debug",
"test_android_release": "detox test --configuration android.sim.release",
"prettier": "prettier --check \"App/**/*.{js,jsx,ts,tsx}\"",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --quiet",
"typescript": "tsc -p ."
},
"dependencies": {
"@datadog/mobile-react-native": "1.2.0",
"@datadog/mobile-react-navigation": "1.2.0",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-native-community/cli-platform-android": "^4.13.0",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "^8.1.0",
"@react-native-community/progress-bar-android": "^1.0.4",
"@react-native-community/progress-view": "^1.1.1",
"@react-native-community/push-notification-ios": "^1.6.1",
"@react-native-community/slider": "^3.0.3",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/analytics": "^11.3.2",
"@react-native-firebase/app": "^11.3.2",
"@react-native-firebase/crashlytics": "^11.3.2",
"@react-native-firebase/dynamic-links": "^11.3.2",
"@react-native-firebase/messaging": "^11.3.2",
"@react-navigation/bottom-tabs": "^5.11.2",
"@react-navigation/native": "^5.8.10",
"@react-navigation/stack": "^5.12.8",
"@segment/analytics-react-native": "^2.20.3",
"@segment/sovran-react-native": "^1.1.3",
"@sentry/react-native": "^5.33.1",
"apisauce": "^2.0.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"compare-versions": "^3.6.0",
"eslint-config-react-native-typescript": "^2.2.7",
"getstream": "^7.1.0",
"global": "^4.4.0",
"immutable": "^4.0.0-Frc.12",
"jstz": "^2.1.1",
"jwt-decode": "^3.1.2",
"libphonenumber-js": "^1.9.11",
"lighten-darken-color": "^1.0.0",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"moment-timezone": "0.5.11",
"patch-package": "^6.2.2",
"postinstall-postinstall": "^2.1.0",
"prop-types": "^15.7.2",
"react": "17.0.2",
"react-native": "0.67.2",
"react-native-appstore-version-checker": "^2.7.2",
"react-native-aws3": "0.0.9",
"react-native-blob-util": "0.17.0",
"react-native-calendars": "^1.20.0",
"react-native-config": "^1.4.5",
"react-native-date-picker": "^4.1.3",
"react-native-device-info": "10.2.0",
"react-native-document-picker": "^4.2.0",
"react-native-fast-image": "^8.6.1",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.9.0",
"react-native-get-random-values": "^1.5.0",
"react-native-hyperlink": "^0.0.19",
"react-native-i18n": "2.0.14",
"react-native-image-crop-picker": "^0.41.2",
"react-native-image-picker": "^7.1.2",
"react-native-inappbrowser-reborn": "^3.7.0",
"react-native-keyboard-manager": "^4.0.13-17",
"react-native-maps": "^0.27.1",
"react-native-maps-super-cluster": "^1.6.0",
"react-native-mmkv": "^2.4.3",
"react-native-orientation-locker": "^1.3.1",
"react-native-pdf": "6.4.0",
"react-native-permissions": "^3.0.3",
"react-native-phone-number-input": "^2.0.0",
"react-native-photoeditorsdk": "2.12.0",
"react-native-progress": "^4.1.2",
"react-native-push-notification": "^7.3.1",
"react-native-reanimated": "^1.13.2",
"react-native-render-html": "^6.3.4",
"react-native-restart": "^0.0.20",
"react-native-safe-area-context": "^3.1.8",
"react-native-screens": "^2.16.1",
"react-native-segmented-control-tab": "^3.4.1",
"react-native-signature-capture": "^0.4.10",
"react-native-snackbar": "^2.3.1",
"react-native-star-rating": "^1.1.0",
"react-native-svg": "^12.1.0",
"react-native-svg-charts": "^5.3.0",
"react-native-vector-icons": "^7.1.0",
"react-native-version-number": "^0.3.6",
"react-native-video": "git+https://github.com/MatrixFrog/react-native-video#11ca8a6799f932a5f24da85dfe68c696ad13a753",
"react-native-webview": "^12.1.0",
"react-native-zip-create": "^1.0.12",
"react-redux": "^7.2.2",
"realm": "10.24.0",
"redux": "^4.0.5",
"redux-batched-actions": "^0.5.0",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-persist-filesystem-storage": "^4.0.0",
"redux-persist-seamless-immutable": "git+https://github.com/gudog/redux-persist-seamless-immutable",
"redux-saga": "^1.1.1",
"reduxsauce": "^1.2.0",
"rn-crypto-js": "^1.1.2",
"rn-tooltip": "^3.0.3",
"seamless-immutable": "^7.1.4",
"stream-chat": "^2.10.0",
"stream-chat-react-native": "^2.1.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^3.0.0",
"@types/jest": "^27.0.0",
"@types/react": "^17.0.17",
"@types/react-native": "^0.64.12",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"babel-jest": "^26.6.3",
"detox": "^18.7.1",
"detox-recorder": "^1.0.151",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jest": "^24.4.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-node": "11",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "4",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-native-a11y": "^2.0.4",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"prettier": "^2.3.2",
"prettier-eslint": "^13.0.0",
"react-native-svg-transformer": "^0.14.3",
"react-test-renderer": "17.0.2",
"typescript": "^4.3.5"
},
"jest": {
"preset": "react-native"
}
}
iOS Setup
No response
Android Setup
No response
Other relevant information
No response