fix: removes Inject plugins #837
Merged
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.
Adding and storing context and userInfo is now completely handled in the client, outside of the timeline.
This is to prevent concurrency issues in the timeline where plugins could hold off updating the userInfo, or direct operations like
reset
could cause an processing event to contain information not representative from the sequential order when it was captured.applyRawEventData
now is the capture moment before timeline/plugin processing starts, capturing all the data relevant to the event at a single moment.This is the first step towards completely removing shared state.
InjectContext
andInjectUserInfo
pluginsInjectTraits
example too as it is now discouraged to access shared state from any plugin. (Plugins should operate only with event data or its own state).fetchSettings
first before triggering any lifecycle and context events. This guarantees plugins that use SegmentSettings will have them available before any events are captured. (WIP)