I think this will be the most complicated migration. It's for the activity module, which is currently coupled with the fragment, startup, and the lifecycle ones.
Also, similarly to the network module, the activity one had 2 responsibilities:
Creating telemetry on activity lifecycle methods.
Providing a tool (VisibleScreenTracker) that was used to create a SpanProcessor to add the screen.name attr to all spans.
The second responsibility is needed during the OTel instance initialization, so the tool VisibleScreenTracker was converted into a service (VisibleScreenService) which is used by the init process as well as by the activity instrumentation and will also be used by the fragment module in a follow-up PR.
Since all these modules are related: activity, fragment, startup, and lifecycle, I was planning to migrate them all at once, but then it turned out to be too many code changes, so most of the changes I left for this part are related to the activity module, but might contain some smaller changes into the other modules so that they could compile and we could get a green build for this PR.
I think this will be the most complicated migration. It's for the
activity
module, which is currently coupled with thefragment
,startup
, and thelifecycle
ones.Also, similarly to the
network
module, theactivity
one had 2 responsibilities:VisibleScreenTracker
) that was used to create a SpanProcessor to add thescreen.name
attr to all spans.The second responsibility is needed during the OTel instance initialization, so the tool
VisibleScreenTracker
was converted into a service (VisibleScreenService
) which is used by the init process as well as by the activity instrumentation and will also be used by thefragment
module in a follow-up PR.Since all these modules are related:
activity
,fragment
,startup
, andlifecycle
, I was planning to migrate them all at once, but then it turned out to be too many code changes, so most of the changes I left for this part are related to theactivity
module, but might contain some smaller changes into the other modules so that they could compile and we could get a green build for this PR.