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

RUM-3905: Use custom naming for threads created inside SDK #1987

Merged

Conversation

0xnm
Copy link
Contributor

@0xnm 0xnm commented Apr 15, 2024

What does this PR do?

This PR introduces custom ThreadFactory for the threads created by SDK. Its only purpose is to name them in format datadog-{context}-threadN, where context may be feature track, etc.

This will give us a better visibility in telemetry (the necessary attribute was added for the executor-related events) and also allows to better navigate profiling data.

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 April 15, 2024 11:07
@0xnm 0xnm force-pushed the nogorodnikov/rum-3905/custom-naming-for-threads-created-by-sdk branch from 78959c0 to f74015f Compare April 15, 2024 11:08
@0xnm 0xnm force-pushed the nogorodnikov/rum-3905/custom-naming-for-threads-created-by-sdk branch 3 times, most recently from cf78d24 to bd89fed Compare April 15, 2024 11:50
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2024

Codecov Report

Merging #1987 (18967d7) into develop (ebf7542) will decrease coverage by 0.02%.
Report is 4 commits behind head on develop.
The diff coverage is 85.71%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1987      +/-   ##
===========================================
- Coverage    83.68%   83.66%   -0.02%     
===========================================
  Files          487      488       +1     
  Lines        17736    17770      +34     
  Branches      2663     2663              
===========================================
+ Hits         14842    14867      +25     
- Misses        2167     2178      +11     
+ Partials       727      725       -2     
Files Coverage Δ
...in/com/datadog/android/core/NoOpInternalSdkCore.kt 9.09% <ø> (ø)
...ore/internal/thread/BackPressureExecutorService.kt 44.44% <100.00%> (+2.14%) ⬆️
...core/internal/thread/BackPressuredBlockingQueue.kt 95.45% <100.00%> (+0.58%) ⬆️
...droid/core/internal/thread/DatadogThreadFactory.kt 100.00% <100.00%> (ø)
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 91.67% <100.00%> (ø)
...lin/com/datadog/android/rum/internal/RumFeature.kt 91.74% <100.00%> (-1.83%) ⬇️
...nal/tracking/AndroidXFragmentLifecycleCallbacks.kt 94.59% <100.00%> (+0.31%) ⬆️
...nternal/tracking/OreoFragmentLifecycleCallbacks.kt 90.00% <100.00%> (+0.53%) ⬆️
...droid/rum/tracking/ActivityViewTrackingStrategy.kt 87.50% <100.00%> (-2.50%) ⬇️
...ain/kotlin/com/datadog/android/core/DatadogCore.kt 81.98% <0.00%> (ø)
... and 2 more

... and 24 files with indirect coverage changes

@0xnm 0xnm force-pushed the nogorodnikov/rum-3905/custom-naming-for-threads-created-by-sdk branch from bd89fed to 18967d7 Compare April 17, 2024 08:18
@0xnm 0xnm merged commit 4836472 into develop Apr 17, 2024
23 checks passed
@0xnm 0xnm deleted the nogorodnikov/rum-3905/custom-naming-for-threads-created-by-sdk branch April 17, 2024 08:53
@0xnm 0xnm mentioned this pull request Apr 17, 2024
3 tasks
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.

None yet

4 participants