Comments (3)
I think we could make this a lot better but it will take some feedback and playing around. I do wish we would store some kind of guid (session storage) or user id (local storage) and when the client loads up look at that and auto start submitting heartbeats? I think that would solve a lot of this, but do we do that once you call useSessions()? The problem with storing a user id or guid is that once the user is authenticated we currently have no way to merge the two sessions. So it would almost have to be two different sessions, or we create a job that updates existing events with new session user (but you might want to see that they were a anon user).
Also, the .NET client has a internal session identifier that gets set to either the user specified session id or the current user and we look at that when submitting. What do we do when the user calls SubmitSessionEnd? Should we clear that and the default user stored in configuration?
Also, when we get to submitting page views, I think a lot of these issues will go away, one shouldn't need to do much to get value out of the system and it's not currently clear to end users that they shouldn't be needing to submit a session start event (only when the user logs in, I know a session might be long lived),
from exceptionless.javascript.
Did you ever find a better solution for this?
from exceptionless.javascript.
@srijken I think this is much better solved in the new version, please let me know if this is not the case and we can reopen and work to improve this.
I would do the following for session management:
import { Exceptionless } from "@exceptionless/browser";
await Exceptionless.startup((c) => {
c.apiKey = "MY_API_KEY";
c.setUserIdentity("12345678", "Blake");
});
await Exceptionless.submitSessionStart();
One could argue we would need to make session end submission easier via browser lifecycle events.
from exceptionless.javascript.
Related Issues (20)
- Include option to pass in fallback UI component into ExceptionlessErrorBoundary HOT 3
- Can't Use exceptionless/react on Next.js project HOT 4
- Feature Request: Add CJS Support HOT 14
- Error reported in vite3. x HOT 2
- Using ExceptionlessClient causes Node script not to exit HOT 5
- Using Exceptionless for nodejs causes problems with AWS Lambda functions HOT 7
- Update docs to showcase session tracking and es6 syntax
- Repeat send options HTTP method HOT 1
- Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. HOT 6
- Breadcrumbs HOT 3
- url parse is wrong HOT 5
- How to disable global exception handling HOT 6
- Where i can find the log HOT 4
- TypeError: (void 0) is not a function HOT 8
- make submitSessionEnd identity parameter optional and look up the user identity. HOT 1
- npm git error with 1.6.2 HOT 1
- this package couldn't work on React Native app HOT 9
- Recommended CDN is end of life HOT 3
- Import/Require From dist folder is confusing HOT 1
- Testing New JavaScript Workspaces Packages HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exceptionless.javascript.