Skip to content

RUM-13075: Do not send TTID and TTFD vitals if they are too large#3031

Merged
aleksandr-gringauz merged 1 commit into
aleksandr-gringauz/feature/app-launch-vitalsfrom
aleksandr-gringauz/RUM-13075/cut-off-large-ttid
Nov 28, 2025
Merged

RUM-13075: Do not send TTID and TTFD vitals if they are too large#3031
aleksandr-gringauz merged 1 commit into
aleksandr-gringauz/feature/app-launch-vitalsfrom
aleksandr-gringauz/RUM-13075/cut-off-large-ttid

Conversation

@aleksandr-gringauz

@aleksandr-gringauz aleksandr-gringauz commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

See description in the linked ticket (RUM-13075).

Also decided to do the same thing for TTFD (not send vital event that has a duration greater than a certain threshold).

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-13075/cut-off-large-ttid branch from 36f6fe1 to 46cb7bc Compare November 27, 2025 16:22
@aleksandr-gringauz aleksandr-gringauz changed the title RUM-13075: Do not send TTID and TTFD if they are larger than 1 minute RUM-13075: Do not send TTID and TTFD if they are too large Nov 27, 2025
@aleksandr-gringauz aleksandr-gringauz changed the title RUM-13075: Do not send TTID and TTFD if they are too large RUM-13075: Do not send TTID and TTFD vitals if they are too large Nov 27, 2025
@datadog-official

datadog-official Bot commented Nov 27, 2025

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 71.46% (+0.02%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: dc9e3c6 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter

codecov-commenter commented Nov 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.29%. Comparing base (23e8d2b) to head (dc9e3c6).

Additional details and impacted files
@@                               Coverage Diff                                @@
##           aleksandr-gringauz/feature/app-launch-vitals    #3031      +/-   ##
================================================================================
+ Coverage                                         71.24%   71.29%   +0.05%     
================================================================================
  Files                                               861      861              
  Lines                                             31659    31684      +25     
  Branches                                           5327     5329       +2     
================================================================================
+ Hits                                              22555    22588      +33     
+ Misses                                             7587     7580       -7     
+ Partials                                           1517     1516       -1     
Files with missing lines Coverage Δ
.../internal/startup/RumSessionScopeStartupManager.kt 96.19% <100.00%> (+1.19%) ⬆️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


internal const val TTFD_TOO_LARGE_MESSAGE = "TTFD value is too large, skipping it"

internal val MAX_TTID_DURATION_NS: Long = 1.minutes.inWholeNanoseconds

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

) {
ttidReportedForScenario = true

rumAppStartupTelemetryReporter.reportTTID(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We are still sending ttid telemetry event with a large duration. We want to be able to investigate these cases.

@aleksandr-gringauz
aleksandr-gringauz marked this pull request as ready for review November 27, 2025 17:14
@aleksandr-gringauz
aleksandr-gringauz requested review from a team as code owners November 27, 2025 17:14
@satween

satween commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

Why to not filter them out on back-end in order to have more flexibility in future?

if (durationNs > MAX_TTFD_DURATION_NS) {
sdkCore.internalLogger.log(
level = InternalLogger.Level.WARN,
target = InternalLogger.Target.USER,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't we want it on telemetry for statistics purpose?

@aleksandr-gringauz aleksandr-gringauz Nov 28, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added InternalLogger.Target.TELEMETRY to both logs.

@aleksandr-gringauz
aleksandr-gringauz force-pushed the aleksandr-gringauz/RUM-13075/cut-off-large-ttid branch from 46cb7bc to dc9e3c6 Compare November 28, 2025 09:24
@aleksandr-gringauz

Copy link
Copy Markdown
Contributor Author

Why to not filter them out on back-end in order to have more flexibility in future?

Doing it on backend is better in terms of flexibility - yes. But currently I don't know the exact way how to do it. And I don't think that this thing is that important to be flexible with to spend a lot of time with the backend now.

@aleksandr-gringauz
aleksandr-gringauz merged commit c04336c into aleksandr-gringauz/feature/app-launch-vitals Nov 28, 2025
25 of 28 checks passed
@aleksandr-gringauz
aleksandr-gringauz deleted the aleksandr-gringauz/RUM-13075/cut-off-large-ttid branch November 28, 2025 10:27
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.

5 participants