-
Notifications
You must be signed in to change notification settings - Fork 140
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
♻️ [RUMF-1083] introduce session context history #1187
Conversation
1884bc3
to
810a862
Compare
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.
This looks great!
Maybe we could change the session API a bit to have something like:
interface SessionHistory {
findSession(date: RelativeTime): { isTracked(): boolean, getId(): boolean, ...}
}
So when accessing multiple attributes from the same session we don't have to look for it through the history every time:
const session = sessionHistory.findSession(startTime)
if (session.isTracked()) {
...
session: { id: session.getId()! }
}
We could also imagine having a session type like:
type Session<T> = {
tracked: true,
id: string,
replayPlan: boolean
} | {
tracked: false,
replayPlan: false,
}
Codecov Report
@@ Coverage Diff @@
## main #1187 +/- ##
==========================================
+ Coverage 88.85% 88.98% +0.12%
==========================================
Files 100 100
Lines 4270 4293 +23
Branches 971 975 +4
==========================================
+ Hits 3794 3820 +26
+ Misses 476 473 -3
Continue to review full report at Codecov.
|
@BenoitZugmeyer that looks interesting, I'd be in favor of exploring it in a following PR though |
7b4faca
to
73a04fc
Compare
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.
LGTM!
- get session state at event start - remove viewContext session id
604c333
to
1641792
Compare
1641792
to
1bb1d7d
Compare
Motivation
Third part of session management rework, cf #1166, #1180
Changes
ContextHistory
to coresessionStore.expireObservable
Testing
I have gone over the contributing documentation.