-
Notifications
You must be signed in to change notification settings - Fork 44
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
Modularize project so Android instrumentations can used by SDKs that provide their own OpenTelemetry instance #702
Comments
Thank you, @bidetofevil! It'd be awesome if we could come up with a way to use instrumentations independently 👍 You touch on different topics, some of which I fully understand and agree with (such as the part that reads: "Refactor the initialization of the services so they are done lazily, in case they are not all needed for the specific set of instrumentation that are in use") though I'm not fully sure I follow some others, which are the ones I'd like to expand on below:
I can't find the connection between initializing the OpenTelemetry instance in core, with not being able to use instrumentations independently. My understanding is that instrumentations make use of an OpenTelemetry instance regardless of how it was created, so for example, one way to use an instrumentation independently could be by calling its The problem with calling
The purpose of Those are my questions based on what I understood from your proposal, though I might've misunderstood something so please let me know if that's the case 😅 |
Here is a description of my proposed solution. Every instrumentation will implement the The argument named |
@TomasChladekSL Thanks for your solution proposal. I have a few questions on same:
How will the instrumenter for a given instrumentation be initialized without the opentelemetry sdk instance? For example: ANR instrumenter initialization
|
Background
Conceptually, the
core
module provides serves three purposes:OpenTelemetry
with reasonable defaultsAs an app developer, using this project is straightforward: include the
android-agent
module, configure and start the SDK, profit.However, as @surbhiia points out in #669 , vendors that have their own version of
android-agent
that are used with their own custom instrumentation can't use the instrumentations provided by this directly.Part of that is intentional:- the platform abstraction services are a dependency, so they must be provided by the project to the instrumentations for them to work. But is there a good reason why the
OpenTelemetry
instance has to be created incore
? To put in another way, does the use case outlined in #669 seems reasonable? I think the answer is yes.This issue is about doing all the work to enable the use of instrumentations defined in this project independent from the initialization of the OTel SDK.
Goals
core
so that purpose 1 listed about (i.e. initializeOpenTelemetry
instance) is outside of its direct purviewNon-Goals
core
. In other words,AndroidInstrumentation
will NOT be a publicly supported API.The text was updated successfully, but these errors were encountered: