DataDog / dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Apache License 2.0
141 stars 57 forks source link

Fragment views stopped getting registered #2071

Closed satyajitvure91 closed 1 month ago

satyajitvure91 commented 1 month ago

Describe the bug

I've integrated DD Rum into my android project and initially the fragments were showing up in the visited screens tab. I was playing with a custom fragment predicate to filter some views and ever since the fragments stop showing up altogether. Now only ApplicationLaunch shows up in the tab.

Reproduction steps

RumConfiguration.Builder(applicationId = key)
            .useViewTrackingStrategy(
                FragmentViewTrackingStrategy(
                    trackArguments = true,
                    supportFragmentComponentPredicate = FragmentPredicate()
                )
            ).build

Logcat logs

No response

Expected behavior

Fragment views should show up as the user navigates through the app.

Affected SDK versions

2.8.0

Latest working SDK version

-

Did you confirm if the latest SDK version fixes the bug?

No

Kotlin / Java version

No response

Gradle / AGP version

No response

Other dependencies versions

No response

Device Information

No response

Other relevant information

No response

0xnm commented 1 month ago

Hello @satyajitvure91!

Can you please check that the custom predicate you've created doesn't reject all the views? Basically please make sure that ComponentPredicate#accept doesn't return false all the time.

If it is not the case, can you please set SDK logging verbose to debug by calling Datadog.setVerbosity and check if you have any SDK logs in the Logcat which make be relevant to the issue you are experiencing.