RUMM-2713: Move global RUM context into generic feature context storage#1146
Merged
0xnm merged 2 commits intoNov 17, 2022
Merged
Conversation
0xnm
force-pushed
the
nogorodnikov/rumm-2713/move-away-from-global-rum-context
branch
from
November 16, 2022 13:15
7cb8e6a to
35ccaee
Compare
xgouchet
approved these changes
Nov 17, 2022
0xnm
force-pushed
the
nogorodnikov/rumm-2713/move-away-from-global-rum-context
branch
from
November 17, 2022 08:19
2d356b3 to
ad1cf8a
Compare
mariusc83
reviewed
Nov 17, 2022
| it.setFeatureContext(featureName, mutableContext) | ||
| mutableContext | ||
| } | ||
| if (featureName == RumFeature.RUM_FEATURE_NAME) { |
Member
There was a problem hiding this comment.
why are we doing this only for the RUM feature name ?
Member
Author
There was a problem hiding this comment.
Because context which is received by DatadogPlugin contains only RUM-related info, so it makes sense to update it only when RUM context is updated.
Anyway, DatadogPlugin will be removed in v2. This code won't live long.
0xnm
deleted the
nogorodnikov/rumm-2713/move-away-from-global-rum-context
branch
November 17, 2022 09:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This change removes global RUM context from
GlobalRumsingleton by moving it to the feature's context (DatadogContext#featuresContext).Now RUM context will be stored in the generic dictionary
Map<String, Any?>and can be accessed either by callingDatadogContext#featuresContextor by callingSdkCore#getFeatureContext.Also
SdkCore#setFeatureContextis removed in the favour ofSdkCore#updateFeatureContextmethod which gives a mutable dictionary for the update, final update is thread-safe.Review checklist (to be filled by reviewers)