-
-
Notifications
You must be signed in to change notification settings - Fork 23
Fixes #85 Improvements to session management (Breaking Change) #124
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
Conversation
Added useSessions()
* @param heartbeatInterval The interval at which heartbeats are sent after the last sent event. The default is 1 minutes. | ||
* @param useSessionIdManagement Allows you to manually control the session id. This is only recommended for single user desktop environments. | ||
*/ | ||
public useSessions(sendHeartbeats: boolean = true, heartbeatInterval: number = 60000, useSessionIdManagement: boolean = false) { |
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.
@ejsmith I'm not sure about useSessionIdManagement, I guess this is the safe default since this can be used on node.
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.
It seems fine.
@@ -45,7 +45,7 @@ | |||
"testEnvironment": "jsdom" | |||
}, | |||
"scripts": { | |||
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --sourcemap --target=es2017 --format=esm --outfile=dist/index.bundle.js && esbuild src/index.ts --bundle --minify --sourcemap --target=es2019 --format=esm --outfile=dist/index.bundle.min.js", |
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.
Why did you downgrade this one from es2019 to es2017?
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.
Because all the other ones were es2017. I'm going to upgrade all of these.
* @param heartbeatInterval The interval at which heartbeats are sent after the last sent event. The default is 1 minutes. | ||
* @param useSessionIdManagement Allows you to manually control the session id. This is only recommended for single user desktop environments. | ||
*/ | ||
public useSessions(sendHeartbeats: boolean = true, heartbeatInterval: number = 60000, useSessionIdManagement: boolean = false) { |
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.
It seems fine.
I'm for us updating it to only support NodeJS versions that are still supported for NodeJS. For browsers, I don't think we should push it higher than we need for the features we are using. I don't want to support any versions of IE at this point. |
This sync's changes over from https://github.com/exceptionless/Exceptionless.Net and ensures that you opt into heartbeats.
The breaking change is around heartbeats not being sent / configured when you call setUserIdentity.
I also synced the compiler options which we might want to up our bundle to ES2019 or ES2021 from ES2017. I noticed node is still targeting node 12 with CJS which the new default is ESM. I think we may want to bump this and break this too while we are at it.