You can set user details to debug which customer faces performance issues and crashes. The user information send along with errors, traces, analytics and transactions.

Syntax

using Atatus;

var transactionContext = Agent.Atatus.CurrentTransaction?.Context;
transactionContext?.User = new Atatus.Api.User {Id = "98632", Name = "Daniel", Email = "daniel@acme.com"};

(or)

transactionContext?.User = new Atatus.Api.User();
transactionContext?.User.Id = "98632";

Parameter

Parameter Type Description
User Object (Required) Object contains user id, name and email. Id is required.

Example

copy
icon/buttons/copy
using Atatus;

if (Agent.Atatus.CurrentTransaction != null)
{
   var transactionContext = Agent.Atatus.CurrentTransaction?.Context;
   transactionContext?.User = new Atatus.Api.User();

   transactionContext?.User.Id = "98632";
   transactionContext?.User.Email = "daniel@acme.com";
   transactionContext?.User.Name = "Daniel";
}

See also