Giter Site home page Giter Site logo

Comments (3)

niemyjski avatar niemyjski commented on May 28, 2024

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.

niemyjski avatar niemyjski commented on May 28, 2024

Did you ever find a better solution for this?

from exceptionless.javascript.

niemyjski avatar niemyjski commented on May 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.