Skip to content

RUM-12063: Support long task reporting for multiple SDK instances#2934

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-12063/support-long-task-reporting-for-multiple-sdk-instances
Oct 13, 2025
Merged

RUM-12063: Support long task reporting for multiple SDK instances#2934
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-12063/support-long-task-reporting-for-multiple-sdk-instances

Conversation

@0xnm

@0xnm 0xnm commented Oct 13, 2025

Copy link
Copy Markdown
Member

What does this PR do?

This issue was reported at #2919 (comment).

We fail to report long tasks for multiple SDK instances, because the way it is reported is utilizing setMessageLogging which supports only one Printer instance. So the last SDK instance initialized will get these reports, but SDK instances created before won't.

This PR fixes it by adding a composite printer which will dispatch log messages to the printers registered.

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)

@0xnm
0xnm requested review from a team as code owners October 13, 2025 12:32
@0xnm
0xnm force-pushed the nogorodnikov/rum-12063/support-long-task-reporting-for-multiple-sdk-instances branch from f325262 to 2835599 Compare October 13, 2025 12:44
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 13, 2025

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 75.00%
Total Coverage: 70.83% (-0.05%)

View detailed report

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

@0xnm
0xnm force-pushed the nogorodnikov/rum-12063/support-long-task-reporting-for-multiple-sdk-instances branch from 2835599 to d6ac62e Compare October 13, 2025 13:11
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.80%. Comparing base (c209a89) to head (d6ac62e).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...rnal/instrumentation/MainLooperLongTaskStrategy.kt 85.71% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2934      +/-   ##
===========================================
+ Coverage    70.72%   70.80%   +0.08%     
===========================================
  Files          829      829              
  Lines        30379    30384       +5     
  Branches      5182     5183       +1     
===========================================
+ Hits         21483    21512      +29     
+ Misses        7421     7395      -26     
- Partials      1475     1477       +2     
Files with missing lines Coverage Δ
...rnal/instrumentation/MainLooperLongTaskStrategy.kt 76.67% <85.71%> (+0.67%) ⬆️

... and 34 files with indirect coverage changes

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

@0xnm
0xnm merged commit 20de5e0 into develop Oct 13, 2025
25 checks passed
@0xnm
0xnm deleted the nogorodnikov/rum-12063/support-long-task-reporting-for-multiple-sdk-instances branch October 13, 2025 14:24
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.

4 participants