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

RUMM-2699: Remove RumEventSourceProvider #1119

Merged

Conversation

0xnm
Copy link
Member

@0xnm 0xnm commented Nov 2, 2022

What does this PR do?

This change removes RumEventSourceProvider, because we shouldn't access CoreFeature (it won't be exposed as public API), so we cannot read CoreFeature#sourceName at the DatadogRumMonitor construction time and should read DatadogContext#source instead which is available in the Event Write Context.

Calls to RumEventSourceProvider are replaced by the companion extensions of the corresponding Source objects which try to parse the value from DatadogContext#source in the safe manner.

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 marked this pull request as ready for review November 2, 2022 10:50
@0xnm 0xnm requested a review from a team as a code owner November 2, 2022 10:50
Base automatically changed from nogorodnikov/rumm-2602/use-event-write-context-for-rum to feature/sdkv2 November 2, 2022 10:52
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2022

Codecov Report

Merging #1119 (0bab8ec) into feature/sdkv2 (d71fe7b) will decrease coverage by 0.06%.
The diff coverage is 93.62%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1119      +/-   ##
=================================================
- Coverage          82.49%   82.43%   -0.06%     
=================================================
  Files                348      348              
  Lines              11409    11380      -29     
  Branches            1910     1911       +1     
=================================================
- Hits                9411     9380      -31     
+ Misses              1421     1419       -2     
- Partials             577      581       +4     
Impacted Files Coverage Δ
...n/com/datadog/android/core/internal/CoreFeature.kt 91.06% <ø> (-0.04%) ⬇️
.../main/kotlin/com/datadog/android/rum/RumMonitor.kt 77.08% <ø> (-0.92%) ⬇️
...d/rum/internal/domain/scope/RumApplicationScope.kt 100.00% <ø> (ø)
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.43% <ø> (-0.12%) ⬇️
...d/rum/internal/domain/scope/RumViewManagerScope.kt 98.15% <ø> (-0.07%) ⬇️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 92.61% <ø> (+0.52%) ⬆️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 89.23% <0.00%> (-1.68%) ⬇️
...android/rum/internal/ndk/DatadogNdkCrashHandler.kt 85.28% <66.67%> (-4.01%) ⬇️
...ndroid/rum/internal/domain/scope/RumActionScope.kt 98.56% <100.00%> (-0.02%) ⬇️
...g/android/rum/internal/domain/scope/RumEventExt.kt 94.42% <100.00%> (+0.67%) ⬆️
... and 13 more

@0xnm 0xnm force-pushed the nogorodnikov/rumm-2699/remove-rumeventsourceprovider branch from 214ca9b to 9b2b3ab Compare November 2, 2022 11:29
@0xnm 0xnm force-pushed the nogorodnikov/rumm-2699/remove-rumeventsourceprovider branch from 9b2b3ab to 0bab8ec Compare November 2, 2022 11:47
@xgouchet xgouchet added the size-large This PR is large sized label Nov 2, 2022
@0xnm 0xnm merged commit 6bf630f into feature/sdkv2 Nov 3, 2022
@0xnm 0xnm deleted the nogorodnikov/rumm-2699/remove-rumeventsourceprovider branch November 3, 2022 08:55
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-large This PR is large sized
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants