IvanJosipovic / BlazorApplicationInsights

Application Insights for Blazor web applications

Home Page:https://BlazorApplicationInsights.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Get User and Session IDs

tdashworth opened this issue ยท comments

It would be useful to be able to retrieve the user/session IDs so that I can provide them in error messages.

It looks like they are stored in cookies by default but I guess that is flexible.

I am happy to add this if you'd accept?

Have you checked if there is any code in the ApplicationInsights.JS that performs this function?

I can't see it in their API.

I think I found them.

User Id: appInsights.context.user.authenticatedId
Session Id: appInsights.context.sessionManager.automaticSession.id

Nice! Happy to contribute back and raise a PR?

A PR would be appreciated :)

๐ŸŽ‰ This issue has been resolved in version 2.1.0 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€