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

RUM View name is not shown completely when the obfuscation is enabled (Proguard/R8 enabled) #967

Open
Maxwell6635 opened this issue Jun 30, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@Maxwell6635
Copy link

Thanks for taking the time for reporting an issue!

Describe what happened
View Name or Class Name is obfuscated in DataDog Rum View Dashboard.

Steps to reproduce the issue:

  1. Enable Proguard Rules
  2. Upload mapping files with Datadog Plugins

Describe what you expected:
View Name able to be de-obfuscated
Screenshot 2022-06-30 at 12 11 17 PM

Additional context

  • Datadog SDK version: 1.12.0
  • Datadog Gradle Plugins version: 1.4.0
  • Versions of any other relevant dependencies (OkHttp, …): 4.9.0 OKhttp
  • Proguard configuration: Enable Full Mode for R8
  • Gradle Plugins: 7.2.0
@Maxwell6635 Maxwell6635 added the bug Something isn't working label Jun 30, 2022
@xgouchet
Copy link
Member

Hi @Maxwell6635, the deobfuscation in Datadog is mostly performed on Errors' stacktraces.
The name of a view, by default uses the View's canonical class name, but you have an option to rename it if you want to.
When building the configuration of the SDK, you can use:

        val configBuilder = Configuration.Builder(
                logsEnabled = true,
                tracesEnabled = true,
                crashReportsEnabled = true,
                rumEnabled = true
        )
                .useViewTrackingStrategy(
                        ActivityViewTrackingStrategy(
                                trackExtras = true,
                                componentPredicate = object: ComponentPredicate<Activity> {
                                    override fun accept(component: Activity): Boolean {
                                        // Should we consider this activity as a RUM View?
                                        return true
                                    }
                                    
                                    override fun getViewName(component: Activity): String? {
                                        // What should be the name of the RUM View
                                        return component.title.toString()
                                    }
                                }
                        )
                )

@xgouchet xgouchet added enhancement New feature or request and removed bug Something isn't working labels Jun 30, 2022
@Maxwell6635
Copy link
Author

@xgouchet Hi, if we upload the mapping via this plugins.
https://github.com/DataDog/dd-sdk-android-gradle-plugin

So the deobfuscation on ViewName will it not works right?

@xgouchet
Copy link
Member

Hi @Maxwell6635 , no the view name won't be deobfuscated, only the errors stacktraces will.

@Maxwell6635
Copy link
Author

@xgouchet any plan to support this ?

@xgouchet
Copy link
Member

xgouchet commented Jul 4, 2022

For now this is not on our immediate roadmap but we might consider it eventually

@sonrohan
Copy link

@xgouchet Sorry to unearth an old thread, but do you know if this is on the roadmap?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants