public ActorLogger(
            FG.ServiceFabric.Diagnostics.ActorOrActorServiceDescription actor)
        {
            _actor = actor;

            _telemetryClient = new Microsoft.ApplicationInsights.TelemetryClient();
            _telemetryClient.Context.User.Id                = Environment.UserName;
            _telemetryClient.Context.Session.Id             = Guid.NewGuid().ToString();
            _telemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString();
        }
Exemple #2
0
 public void StopActorActive(
     FG.ServiceFabric.Diagnostics.ActorOrActorServiceDescription actor)
 {
     if (this.IsEnabled())
     {
         StopActorActive(
             actor.ActorType.ToString(),
             actor.ActorId.ToString(),
             actor.ApplicationTypeName,
             actor.ApplicationName,
             actor.ServiceTypeName,
             actor.ToString(),
             actor.PartitionId,
             actor.ReplicaOrInstanceId,
             actor.NodeName);
     }
 }
Exemple #3
0
 public void ActorHostInitializationFailed(
     FG.ServiceFabric.Diagnostics.ActorOrActorServiceDescription actor,
     System.Exception ex)
 {
     if (this.IsEnabled())
     {
         ActorHostInitializationFailed(
             actor.ActorType.ToString(),
             actor.ActorId.ToString(),
             actor.ApplicationTypeName,
             actor.ApplicationName,
             actor.ServiceTypeName,
             actor.ToString(),
             actor.PartitionId,
             actor.ReplicaOrInstanceId,
             actor.NodeName,
             ex.Message,
             ex.Source,
             ex.GetType().FullName,
             ex.AsJson());
     }
 }