-
Notifications
You must be signed in to change notification settings - Fork 40
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
Extract AndroidInstrumentation Interface and related classes into their own module + update install method to take generic OpenTelemetry instance #658
Comments
Created issue #669 to capture extraction of 4 services in their own modules and extracting the two classes in the services folder to some other relevant modules. |
Hi @LikeTheSalad, @bidetofevil, @marandaneto ! Reaching out to gather any opinions you guys might have on the first part of this issue - "it would be helpful to have the AndroidInstrumentation Interface and related interface (AndroidInstrumentationLoader) and classes (AndroidInstrumentationLoaderImpl) reside in their own separate module." Due to a holiday tomorrow for me, won't be able to join Android Sig so collecting some asynchronous feedback here so we can make progress on this one. Thanks a lot! :) |
Hi @surbhiia I think it makes sense since we're moving towards allowing users to use auto-instrumentations independently. It seems like this might not be the only responsibility that we should extract from core, as I've noticed some mentions of doing something similar for services too. I think it's doable, although I'd like to discuss the details in a SIG meeting. |
Thanks @LikeTheSalad for your feedback! I'll bring it up for discussion in the next android SIG meeting. :) |
Currently, AndroidInstrumentation classes are housed as follows: Proposal to move them as follows as an independent module: The test classes under core -> test -> instrumentation would also be moved to the new module and core will now depend on the new module. Changes to classes:
This is mostly a straightforward change. Will propose other modularization changes to core in the services issue. Let me know what you all think! :) |
Right now all the instrumentations implement the AndroidInstrumentation Interface which resides in the bigger core module. If suppose, some vendors just want to utilize the individual instrumentation modules like OkHttp3 / HttpURLConnection without all of the core SDK, they'd be dependent on the bigger core module without needing it. So, it would be helpful to have the AndroidInstrumentation Interface and related interface (AndroidInstrumentationLoader) and classes (AndroidInstrumentationLoaderImpl) reside in their own separate module.
Secondly, If a vendor does not want to use OpenTelemetryRum Interface and just the individual instrumentations, they'd not be able to do that because the AndroidInstrumentation install method requires an OpenTelemetryRum instance. We should change it to generic OpenTelemetry instance instead. For example: if I want to utilize the HttpURLConnection instrumentation, I'd have to do the following:
Instead, I should be able to do the following:
For some of the other instrumentations that depend on some services, there'd still be dependence on the core. For example, ANR instrumentation depends on AppLifecycle Service. I plan to create another issue/proposal to extract services out in their own separate modules as well so vendors can plug-in the services they need only - based on the instrumentations they're utilizing.
I'm happy to make this code change once we have a consensus on this requirement. :)
The text was updated successfully, but these errors were encountered: