Skip to content

RUMM-2333: Features can store their context in SDK context#1036

Merged
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2333/features-can-store-their-context
Sep 9, 2022
Merged

RUMM-2333: Features can store their context in SDK context#1036
0xnm merged 1 commit into
feature/sdkv2from
nogorodnikov/rumm-2333/features-can-store-their-context

Conversation

@0xnm

@0xnm 0xnm commented Sep 7, 2022

Copy link
Copy Markdown
Member

What does this PR do?

A small change allowing features to store their context in the SDK context. The actual usage and (maybe) subscription model for the changes will come later.

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 a review from a team as a code owner September 7, 2022 14:33
@codecov-commenter

codecov-commenter commented Sep 7, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1036 (ef11545) into feature/sdkv2 (5577287) will increase coverage by 0.01%.
The diff coverage is 83.33%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1036      +/-   ##
=================================================
+ Coverage          82.89%   82.90%   +0.01%     
=================================================
  Files                301      301              
  Lines               9947     9951       +4     
  Branches            1636     1637       +1     
=================================================
+ Hits                8245     8249       +4     
+ Misses              1206     1205       -1     
- Partials             496      497       +1     
Impacted Files Coverage Δ
.../kotlin/com/datadog/android/v2/core/DatadogCore.kt 65.60% <0.00%> (-0.53%) ⬇️
...n/com/datadog/android/core/internal/CoreFeature.kt 91.27% <100.00%> (+0.07%) ⬆️
...m/datadog/android/v2/api/context/DatadogContext.kt 100.00% <100.00%> (ø)
...android/v2/core/internal/DatadogContextProvider.kt 81.67% <100.00%> (+0.31%) ⬆️
...rsistence/file/batch/PlainBatchFileReaderWriter.kt 88.24% <0.00%> (-2.94%) ⬇️
...core/internal/system/DefaultAndroidInfoProvider.kt 80.43% <0.00%> (-2.17%) ⬇️
...rc/main/java/com/datadog/opentracing/DDTracer.java 56.49% <0.00%> (+0.84%) ⬆️
...ain/java/com/datadog/opentracing/PendingTrace.java 60.34% <0.00%> (+2.59%) ⬆️

@xgouchet xgouchet added the size-small This PR is small sized label Sep 7, 2022
fakeProcessImportance = forge.anInt()
// building nested maps with default size slows down tests quite a lot, so will use
// an explicit small size
fakeFeaturesContext = forge.aMap(size = 2) {

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.

good call

)
}

override fun setFeatureContext(feature: String, context: Map<String, Any?>) {

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.

Looks a bit weird to have this function in the ContextProvider. Why not having it in the SdkCore ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@0xnm
0xnm merged commit b4c813b into feature/sdkv2 Sep 9, 2022
@0xnm
0xnm deleted the nogorodnikov/rumm-2333/features-can-store-their-context branch September 9, 2022 06:47
@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-small This PR is small sized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants