-
Notifications
You must be signed in to change notification settings - Fork 2
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
use continuation-local-storage to store session info #3
Conversation
@@ -60,6 +69,10 @@ export module TelemetryWrapper { | |||
} | |||
} | |||
|
|||
export function currentSession() { |
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.
Currently, the session and reporter are in one class. They have different concerns and roles so I would suggest that we separate them.
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.
@akaroml If I got it right, they're not defined in one class.
Session is defined in Session.ts
TelemetryReporter is defined in package vscode-extension-telemetry
.
TelemetryWrapper.ts
defines static variables and functions, e.g. a static TelemetryReporter instance, and a static method currentSession()
.
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.
got that, Session
and TelemetryReporter
decoupled.
About implementation of
continuation-local-storage
, refer to:nodejs/node-v0.x-archive#5243
Now simply use: