Skip to content

(2/4) RUM-2129 let customer set custom persistence strategy in configuration#1746

Merged
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-2129/2_custom_persistence_mgt
Nov 29, 2023
Merged

(2/4) RUM-2129 let customer set custom persistence strategy in configuration#1746
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-2129/2_custom_persistence_mgt

Conversation

@xgouchet

@xgouchet xgouchet commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

This PR has been created automatically by splitting a large branch

Pull request 2 out of 4

The overall goal is to create a feature allowing customers to store unsent data any way they want (instead of using the official disk batch files)

This PR adds the necessary methods to set a custom PersistenceStrategy.Factory in the core configuration.

When set, this will be reported in the configuration telemetry, and
the persistenceStrategyFactory will be stored in the CoreFeature instance

When set, this will be reported in the configuration telemetry, and
the persistenceStrategyFactory will be store in the CoreFeature instance
@xgouchet
xgouchet requested review from a team as code owners November 27, 2023 09:01
fun setAdditionalConfiguration(Map<String, Any>): Builder
fun setProxy(java.net.Proxy, okhttp3.Authenticator?): Builder
fun setEncryption(com.datadog.android.security.Encryption): Builder
fun setPersistenceStrategyFactory(com.datadog.android.core.persistence.PersistenceStrategy.Factory?): Builder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we hide it behind some internal proxy? I was thinking that we are not going to show this method to everyone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The thing is that we don't have an internal proxy for the configuration. The fact that the interface to implement is not trivial at all makes me think that no one (if they discover it) will bother implementing it

@codecov-commenter

codecov-commenter commented Nov 28, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1746 (c2a203b) into develop (d51b468) will decrease coverage by 0.07%.
Report is 5 commits behind head on develop.
The diff coverage is 91.67%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1746      +/-   ##
===========================================
- Coverage    83.37%   83.29%   -0.07%     
===========================================
  Files          466      466              
  Lines        16183    16189       +6     
  Branches      2411     2412       +1     
===========================================
- Hits         13491    13484       -7     
- Misses        2036     2043       +7     
- Partials       656      662       +6     
Files Coverage Δ
...atadog/android/core/configuration/Configuration.kt 96.70% <100.00%> (+0.19%) ⬆️
...n/com/datadog/android/core/internal/CoreFeature.kt 88.26% <100.00%> (+0.42%) ⬆️
...ain/kotlin/com/datadog/android/core/DatadogCore.kt 83.70% <50.00%> (-0.54%) ⬇️

... and 22 files with indirect coverage changes

Base automatically changed from xgouchet/RUM-2129/1_custom_persistence_mgt to develop November 29, 2023 09:36
@xgouchet
xgouchet merged commit 99ddc9a into develop Nov 29, 2023
@xgouchet
xgouchet deleted the xgouchet/RUM-2129/2_custom_persistence_mgt branch November 29, 2023 10:25
@xgouchet xgouchet added this to the 2.4.0 milestone Dec 13, 2023
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.

4 participants