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

DdRumContentProvider added to manifest despite not using RUM feature #1751

Open
lwasyl opened this issue Nov 28, 2023 · 3 comments
Open

DdRumContentProvider added to manifest despite not using RUM feature #1751

lwasyl opened this issue Nov 28, 2023 · 3 comments
Labels
question Further information is requested

Comments

@lwasyl
Copy link

lwasyl commented Nov 28, 2023

Describe what happened
After updating to 2.3.0 (from 1.19.3) I noticed that a provider was added to the apk: com.datadog.android.rum.DdRumContentProvider. The only two DD dependencies that I added to the project are com.datadoghq:dd-sdk-android-trace and com.datadoghq:dd-sdk-android-okhttp

I'm reporting this as a bug since the 1.x -> 2.x migration document suggests that

All relevant products (RUM, Trace, Logs, etc.) are now extracted into different modules. That allows you to integrate only what is needed into your application.

Since I'm not using RUM, I don't expect any RUM classes being pulled into the project.

If this is not a bug, then I'd ask for clarification whether it's safe to explicitly remove this provider even though it's added by the library automatically

Additional context

  • Datadog SDK version: 2.3.0
@lwasyl lwasyl added the bug Something isn't working label Nov 28, 2023
@xgouchet
Copy link
Collaborator

Hi @lwasyl and thanks for this question.

This is not a bug, but mostly a side effect of using the com.datadoghq:dd-sdk-android-okhttp dependency, which provides OkHttp integration for both RUM and Trace features.

The DdRumContentProvider is mostly a no-op provider that simply measures the timestamp and reason for the. process startup. It's then used by RUM features, but you can safely remove it from your build if you need to.

@xgouchet xgouchet added question Further information is requested and removed bug Something isn't working labels Nov 29, 2023
@lwasyl
Copy link
Author

lwasyl commented Nov 29, 2023

Thank you, it wasn't clear to me that okhttp is a common artifact that bundles integration related to okhttp for all features 👍

In that case I might suggest to expose the RUM dependency as api in the okhttp, since right now removing the attribute is tricky as IDE doesn't see RUM classes. However I see that RUM classes are part of public API of e.g. DatadogInterceptor so exposing them would make sense overall.

Would you consider separating artifacts for okhttp-tracing and okhttp-rum integrations separately? TracingInterceptor doesn't seem to depend on RUM by itself

@xgouchet
Copy link
Collaborator

In that case I might suggest to expose the RUM dependency as api in the okhttp, since right now removing the attribute is tricky as IDE doesn't see RUM classes. However I see that RUM classes are part of public API of e.g. DatadogInterceptor so exposing them would make sense overall.

That's a good point, I'll add it to our backlog indeed

Would you consider separating artifacts for okhttp-tracing and okhttp-rum integrations separately? TracingInterceptor doesn't seem to depend on RUM by itself

That's another solution, which goes in a direction that we think is too verbose, especially since the RumInterceptor relis on the TracingInterceptor, so those two are kinda coupled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants