Fixes #85 Improvements to session management (Breaking Change) #124
Merged
Fixes #85 Improvements to session management (Breaking Change) #124
Conversation
Added useSessions()
niemyjski
commented
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) { |
Member
Author
There was a problem hiding this comment.
@ejsmith I'm not sure about useSessionIdManagement, I guess this is the safe default since this can be used on node.
niemyjski
commented
Feb 27, 2023
ejsmith
approved these changes
Feb 28, 2023
| "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", |
Member
There was a problem hiding this comment.
Why did you downgrade this one from es2019 to es2017?
Member
Author
There was a problem hiding this comment.
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) { |
Member
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.