sentry-java
sentry-java copied to clipboard
Add method to get the installation ID
Problem Statement
In our App we have a button which allows the user to report issues. For that, we would love to add some optional information like the installation ID from Sentry, so we can use that to analyse the user issues. Right now I have no way to consistently get the information.
I tried setting a User manually, without any ID, which should lead to using the installation ID, which I should then be able to read out from the current scope, but that is not working reliably.
Solution Brainstorm
So what I would love to have:
Sentry.getInstallationId() which would return the installation DI or Sentry.getUser(), which would return a default User, with the installation ID as user id.
Hi @JohannesPtaszyk the feature request makes sense, we'll for sure consider implementing it, thanks for reporting!
@romtsn Additional Use Case for the mobile/cross platform SDK: Login/Logout
- When a user logs in, the SDKs provide a way to set the user id, username, etc.
- When a user logs out, the SDK does not provide an interface to reset the user id back to its original user id (i.e. the installationId)
In the absence of "resetUser" type of functionality, the ability to get the installationId would allow apps to implement login/logout and the ability to associate events prior to login and events after logout to a single installation id.
(Perhaps this functionality exists in java/android but it seems to be missing from ios)