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

Wrong TTID and TTFD #3145

Closed
ohjunki opened this issue Jan 17, 2024 · 8 comments
Closed

Wrong TTID and TTFD #3145

ohjunki opened this issue Jan 17, 2024 · 8 comments
Assignees
Labels
Platform: Android Stale Sync: Jira apply to auto-create a Jira shadow ticket Type: Bug Something isn't working

Comments

@ohjunki
Copy link

ohjunki commented Jan 17, 2024

Integration

sentry-android

Build System

Gradle

AGP Version

8.1.0

Proguard

Enabled

Version

7.2.0

Steps to Reproduce

There is a case where TTID and TTFD are incorrectly recorded. The reproducible path is as follows: when Activity(1) is turned on, if you immediately enter the new Activity(2) within 1-2 seconds, and then return to Activity(1), TTID and TTFD are overwritten with onResume timestamp values, resulting in incorrect values being recorded. The suspected code location is as follows.

MeasurementValue.KEY_TIME_TO_FULL_DISPLAY, durationMillis, MILLISECOND);

However, it seems to be frequently reproducible when the time between starting Activity(1) and returning to Activity(1) is within about 3 seconds. If you navigate to Activity(2) and stay there for a while, you can confirm that TTID and TTFD of Activity(1) are correctly recorded on the Discovery page. However, in cases where you return within 3 seconds, there are occasional instances of incorrect recording.

Expected Result

Activity(2) was started through a button click in Activity(1), and since TTFD was reported before the start, it should represent the time just before Activity(2) started.

Actual Result

The time when returned to Activity(1).

┆Issue is synchronized with this Jira Improvement by Unito

@kahest
Copy link
Member

kahest commented Jan 17, 2024

Hey @ohjunki thanks for reporting and the detailed steps to reproduce! If you're using SaaS, would you be able to post links to transactions that show this behavior (vs. transactions that don't)? You can also send them to karl.struggl@sentry.io if you prefer.

@romtsn
Copy link
Member

romtsn commented Jan 17, 2024

The solution would be to only set TTID/TTFD values once and not overwrite when coming back to onResume for already running transaction

@ohjunki
Copy link
Author

ohjunki commented Jan 18, 2024

Hi @kahest I sent the link via email, which subject is "[sentry-java][issue-3145] TTID TTFD debug content". Thank you for the prompt response!

@ohjunki
Copy link
Author

ohjunki commented Feb 27, 2024

@kahest Hi, is there any update?

@kahest
Copy link
Member

kahest commented Feb 27, 2024

Hi @ohjunki - your data confirmed our assumptions and our approach, but we didn't have the bandwidth to implement this yet, we plan to tackle this soon.

@realkosty
Copy link

Added example issue from a large sales-led customer to linked Jira

@stefanosiano
Copy link
Member

I'm not able to reproduce the issue anymore.
This is likely fixed by #3219 in version 7.5.0, where we introduced a check to avoid changing measurements in finished spans
@ohjunki @realkosty Can you try again with SDK version 7.5.0 or higher?

@getsantry
Copy link

getsantry bot commented May 10, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Stale Sync: Jira apply to auto-create a Jira shadow ticket Type: Bug Something isn't working
Projects
Archived in project
Archived in project
Development

No branches or pull requests

6 participants