⏱ Estimated Time To Completion: 2 minutes

Overview of User Fields

Users in Decipher are identified by at least one of the following fields:

  • email: The user’s email address. This is the recommended identifier if available.
  • id: Your internal identifier for the user.
  • username: The username, typically used as a more readable label than the internal id.
  • ip_address: The user’s IP address. If the user is unauthenticated, Decipher uses the IP address as a unique identifier. For server-side SDKs, this is often pulled from the HTTP request data.

You can also provide additional key/value pairs beyond these reserved names, and Decipher will store them with the user information. For example, set account to represent the user belongs to an organization.

Anywhere in your application where you have user information, call the setUser (or set_user, depending on language) method.

Make sure to call setUser in your frontend to ensure replays are tagged correctly.
// Set user information in Decipher via the Sentry TypeScript SDK
Sentry.setUser({
  "email": "jane.doe@example.com",  // Recommended identifier to set (can add others)
  "id": "your_internal_unique_identifier", // use if email not available
  "username": "unique_username", // use if email not available
  "account": "AcmeCo",  // Which account/organization is this user a member of?
  // Additional user information can be added here        
});