Skip to content

Commit eaeb158

Browse files
Merge pull request #2649 from DataDog/aleksandr-gringauz/RUM-9958/fix-crash-baseline
RUM-9958: Fix datadog core creation in baseline benchmark run
2 parents 9515e48 + 5e3125c commit eaeb158

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sample/benchmark/src/main/java/com/datadog/benchmark/sample/di/activity/DatadogActivityModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ internal interface DatadogActivityModule {
4747
context: Context,
4848
config: BenchmarkConfig
4949
): SdkCore {
50-
check(config.run != SyntheticsRun.Baseline) {
51-
"Datadog must not be initialized in baseline run"
50+
if (config.run == SyntheticsRun.Baseline) {
51+
return Datadog.getInstance() // returns NoOpInternalSdkCore under the hood
5252
}
5353

5454
return Datadog.initialize(

0 commit comments

Comments
 (0)