Describe what happened
The error tracking option serviceName is not picked up on Android, starting from v2.8.0 of Datadog React Native SDK.
Reported by @FrikkieSnyman on DataDog/dd-sdk-reactnative#879 (comment)
Steps to reproduce the issue
Use a custom serviceName
[
'expo-datadog',
{
errorTracking: {
serviceName: 'custom-service-name',
iosSourcemaps: true,
androidSourcemaps: true,
}
}
]
The android/app/build.gradle is modified as follows:
plugins {
id("com.datadoghq.dd-sdk-android-gradle-plugin") version "1.14.0"
}
datadog {
checkProjectDependencies = "none"
serviceName = "custom-service-name"
}
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: "node_modules/@datadog/mobile-react-native/datadog-sourcemaps.gradle"
Leading to serviceName not being picked up, due to the fact that the Datadog React Native SDK expects it to be in project.ext.datadog properties.
Expected outcome
The serviceName is defined in the project.ext.datadog properties, and the React Native SDK picks up the serviceName from datadog as a fallback for retro-compatibility.
Describe what happened
The error tracking option
serviceNameis not picked up on Android, starting from v2.8.0 of Datadog React Native SDK.Reported by @FrikkieSnyman on DataDog/dd-sdk-reactnative#879 (comment)
Steps to reproduce the issue
Use a custom serviceName
The
android/app/build.gradleis modified as follows:Leading to
serviceNamenot being picked up, due to the fact that the Datadog React Native SDK expects it to be inproject.ext.datadogproperties.Expected outcome
The
serviceNameis defined in theproject.ext.datadogproperties, and the React Native SDK picks up theserviceNamefromdatadogas a fallback for retro-compatibility.