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

"Paused" span for a fragment incorrectly becomes parent of future spans after exiting activity #590

Closed
magda-woj opened this issue Sep 12, 2024 · 0 comments

Comments

@magda-woj
Copy link
Contributor

magda-woj commented Sep 12, 2024

Observed this using the demo app, where we recently implemented an activity (AboutActivity.kt) with fragments. Upon exiting the activity, the Paused span for the last fragment (with fragmentPaused and fragmentStopped events), which is a child of the activity's Paused span, incorrectly becomes the parent for unrelated future spans not connected to the fragment or activity.

Below is a screenshot from the Jaeger UI with the relevant spans expanded:
Zrzut ekranu 2024-09-12 o 09 46 09
In the screenshot, the Created, Paused etc spans under the expanded ones are for different activities, and logo.clicked is a custom span emitted after clicking a button on the main screen.
To reproduce this behaviour:

  1. In the demo app, click "Learn more" on the main screen.
  2. Exit the activity with fragments by selecting "Exit" from the bottom navigation bar.
  3. Click around the app to generate new spans.

It seems to me that simply ending the Paused span and creating a new Stopped span for fragmentStopped resolves this issue and i'll submit a pr for this.

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

No branches or pull requests

1 participant