Skip to content

Log task names for the observable queue dump in case of context executor usage#3412

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/log-task-names-in-context-executor
May 5, 2026
Merged

Log task names for the observable queue dump in case of context executor usage#3412
0xnm merged 1 commit into
developfrom
nogorodnikov/log-task-names-in-context-executor

Conversation

@0xnm

@0xnm 0xnm commented May 4, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Right now we are using NamedRunnable / NamedCallable only in RUM pipeline, meaning we don't have visibility for non-RUM queues.

This PR adds them to the generic submitSafe / executeSafe methods since they already carry operationName, so that we have more visibility when we hit backpressure.

We won't wrap task if it already implements NamedRunnable / NamedCallable.

On top of that, limit the size of the queue when we are doing the copy. Queue may be unbounded (doing only notifications, like in case of context queue), so if we have too many items there copy becomes very heavy.

Note: this approach doesn't work for submit calls, because task get wrapped into another classes there (namely FutureTask at least).

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 May 4, 2026 11:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ebe1e05e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codecov-commenter

codecov-commenter commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.04%. Comparing base (7a4cd87) to head (3e52852).

Files with missing lines Patch % Lines
...e/internal/thread/ObservableLinkedBlockingQueue.kt 66.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3412   +/-   ##
========================================
  Coverage    72.04%   72.04%           
========================================
  Files          960      960           
  Lines        35309    35315    +6     
  Branches      5851     5855    +4     
========================================
+ Hits         25435    25440    +5     
+ Misses        8276     8264   -12     
- Partials      1598     1611   +13     
Files with missing lines Coverage Δ
...n/com/datadog/android/core/internal/CoreFeature.kt 86.72% <100.00%> (ø)
...adog/android/core/internal/utils/ConcurrencyExt.kt 96.83% <100.00%> (+10.62%) ⬆️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 86.24% <ø> (+0.25%) ⬆️
...e/internal/thread/ObservableLinkedBlockingQueue.kt 83.33% <66.67%> (+6.86%) ⬆️

... and 35 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 force-pushed the nogorodnikov/log-task-names-in-context-executor branch from 9ebe1e0 to 3e52852 Compare May 4, 2026 11:58
@0xnm
0xnm merged commit cbd94a0 into develop May 5, 2026
26 checks passed
@0xnm
0xnm deleted the nogorodnikov/log-task-names-in-context-executor branch May 5, 2026 08:50
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