Skip to content

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

Merged
merged 3 commits into from
Feb 28, 2023

Conversation

niemyjski
Copy link
Member

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.

@niemyjski niemyjski requested a review from ejsmith February 27, 2023 13:45
@niemyjski niemyjski self-assigned this Feb 27, 2023
* @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) {
Copy link
Member Author

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.

Copy link
Member

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",
Copy link
Member

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?

Copy link
Member Author

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine.

@ejsmith
Copy link
Member

ejsmith commented Feb 28, 2023

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.

@niemyjski niemyjski merged commit 3c1e208 into main Feb 28, 2023
@niemyjski niemyjski deleted the feature/session_management branch February 28, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants