Skip to content

RUM-9851: Monitor backpressure of context executor#2745

Merged
0xnm merged 1 commit into
nogorodnikov/rum-8170/feature-context-syncfrom
nogorodnikov/rum-9851/monitor-backpressure-for-context-executor
Jun 20, 2025
Merged

RUM-9851: Monitor backpressure of context executor#2745
0xnm merged 1 commit into
nogorodnikov/rum-8170/feature-context-syncfrom
nogorodnikov/rum-9851/monitor-backpressure-for-context-executor

Conversation

@0xnm

@0xnm 0xnm commented Jun 19, 2025

Copy link
Copy Markdown
Member

What does this PR do?

We need to monitor if the queue behind context executor is becoming big, so this PR modifies BackPressuredBlockingQueue a bit to:

  • add constructor to create unbounded queue
  • notify only if a given threshold is reached, separating this value from the capacity value which is basically Int.MAX_VALUE for unbounded queue.

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 June 19, 2025 14:19
@codecov-commenter

codecov-commenter commented Jun 19, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.77%. Comparing base (0ed3955) to head (bc4e1fa).
⚠️ Report is 46 commits behind head on nogorodnikov/rum-8170/feature-context-sync.

Files with missing lines Patch % Lines
...n/com/datadog/android/core/internal/CoreFeature.kt 77.78% 2 Missing ⚠️
...core/internal/thread/BackPressuredBlockingQueue.kt 93.75% 1 Missing and 1 partial ⚠️
...e/internal/thread/ObservableLinkedBlockingQueue.kt 66.67% 2 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                               @@
##           nogorodnikov/rum-8170/feature-context-sync    #2745      +/-   ##
==============================================================================
- Coverage                                       69.82%   69.77%   -0.05%     
==============================================================================
  Files                                             824      824              
  Lines                                           30934    30960      +26     
  Branches                                         5191     5192       +1     
==============================================================================
+ Hits                                            21598    21601       +3     
- Misses                                           7864     7886      +22     
- Partials                                         1472     1473       +1     
Files with missing lines Coverage Δ
...n/com/datadog/android/core/internal/CoreFeature.kt 87.39% <77.78%> (-0.28%) ⬇️
...core/internal/thread/BackPressuredBlockingQueue.kt 90.77% <93.75%> (+0.77%) ⬆️
...e/internal/thread/ObservableLinkedBlockingQueue.kt 76.19% <66.67%> (-7.14%) ⬇️

... and 31 files with indirect coverage changes

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

Base automatically changed from nogorodnikov/rum-10422/handle-case-of-sdk-deinit-when-context-requested to nogorodnikov/rum-8170/feature-context-sync June 20, 2025 07:22
@0xnm
0xnm merged commit 1379c79 into nogorodnikov/rum-8170/feature-context-sync Jun 20, 2025
24 checks passed
@0xnm
0xnm deleted the nogorodnikov/rum-9851/monitor-backpressure-for-context-executor branch June 20, 2025 08:15
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