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

Ending "Paused" span for a fragment. #591

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

magda-woj
Copy link
Contributor

This may be a simple fix for the #590 issue I just submitted. However I don't know the reasoning for the current way, so I don't know if it creates new problems.

Currently onFragmentPaused and onFragmentStopped add events to the same span, which is ended in onFragmentStopped. I propose to end an active span in onFragmentPaused and create a new one in onFragmentStopped. With those changes Paused for About activity is a parent of Paused for the last fragment and analogously with Stopped (so 2 traces with 2 spans each) . Unrelated spans get their own traces in between and after.

In addition to fixing #590 this is consistent with how in Activity Lifecycle Instrumentation Paused and Stopped are separate spans.

@magda-woj magda-woj requested a review from a team September 12, 2024 08:33
@magda-woj magda-woj marked this pull request as draft September 12, 2024 09:04
@magda-woj magda-woj marked this pull request as ready for review September 12, 2024 17:22
@magda-woj
Copy link
Contributor Author

magda-woj commented Sep 17, 2024

(I've been meaning to add this before but forgot) I haven't changed the tests for this because I wanted to wait for a review of the idea not to change them needlessly, as I haven't dug into our unit tests. That's why it doesn't pass checks.

Copy link
Contributor

@LikeTheSalad LikeTheSalad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants