-
Notifications
You must be signed in to change notification settings - Fork 63
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-2536: Use SDK v2 configuration interfaces for features #1079
RUMM-2536: Use SDK v2 configuration interfaces for features #1079
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/sdkv2 #1079 +/- ##
=================================================
- Coverage 82.57% 82.56% -0.01%
=================================================
Files 347 346 -1
Lines 11202 11157 -45
Branches 1845 1831 -14
=================================================
- Hits 9249 9211 -38
- Misses 1378 1383 +5
+ Partials 575 563 -12
|
f710ed7
to
3b40dae
Compare
context: Context, | ||
storage: Storage, | ||
configuration: Configuration.Feature.CrashReport | ||
private fun createPersistenceStrategy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now we are still doing the writing through the persistenceStrategy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now - yes. In the later PRs this will change: interface of DataWriter
will change (and it won't be a single interface in the core
) and for cross-feature interaction we will have message bus instead of getting the writer
of another feature.
What does this PR do?
This change does the following decouples
SdkFeature
from RUM, Logs, etc. features.SdkFeature
will reside in thecore
module and won't be exposed as part of the public API, it is responsible forStorage
andUploader
creation. RUM, Logs, etc. features will be in the independent modules.For now they take
Storage
as a constructor argument, but later on they will only depend onSdkCore
and will do the writing operations using Event Write Context viaSdkCore#getFeature -> FeatureScope#withWriteContext
call.SdkFeature
implementsFeatureScope
.The idea is that
RumFeature
,LogsFeature
, etc. will be handling data serialization (since it is not the responsibility of thecore
) and will write the binary data in the EWC, so for their ownPersistenceStrategy
interface we are leavingDataWriter
part only.DatadogFeature
class is removed in favour ofSdkFeature
.Features lifecycle API will be decided later.
Review checklist (to be filled by reviewers)