Exemple #1
0
 public void RunAsyncLoopFailed(
     Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService,
     FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext context,
     System.Exception ex)
 {
     if (this.IsEnabled())
     {
         RunAsyncLoopFailed(
             actorService.ActorTypeInformation.ImplementationType.ToString(),
             actorService.Context.CodePackageActivationContext.ApplicationTypeName,
             actorService.Context.CodePackageActivationContext.ApplicationName,
             actorService.Context.ServiceTypeName,
             actorService.Context.ServiceName.ToString(),
             actorService.Context.PartitionId,
             actorService.Context.ReplicaId,
             actorService.Context.NodeContext.NodeName,
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["correlationId"],
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["userId"],
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["requestUri"],
             ex.Message,
             ex.Source,
             ex.GetType().FullName,
             ex.AsJson());
     }
 }
        public ServiceDomainLogger(
            Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService,
            FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext context)
        {
            _actorService = actorService;
            _context      = context;

            _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 #3
0
        public PersonActorServiceLogger(
            Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService,
            Guid correlationId,
            string message)
        {
            _actorService  = actorService;
            _correlationId = correlationId;
            _message       = message;

            _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 #4
0
 public void StopRunAsyncLoop(
     Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService,
     FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext context)
 {
     if (this.IsEnabled())
     {
         StopRunAsyncLoop(
             actorService.ActorTypeInformation.ImplementationType.ToString(),
             actorService.Context.CodePackageActivationContext.ApplicationTypeName,
             actorService.Context.CodePackageActivationContext.ApplicationName,
             actorService.Context.ServiceTypeName,
             actorService.Context.ServiceName.ToString(),
             actorService.Context.PartitionId,
             actorService.Context.ReplicaId,
             actorService.Context.NodeContext.NodeName,
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["correlationId"],
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["userId"],
             FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestContext.Current?["requestUri"]);
     }
 }
Exemple #5
0
 public void PersonGenerated(
     Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService,
     Guid correlationId,
     string message,
     string name,
     string title)
 {
     if (this.IsEnabled())
     {
         PersonGenerated(
             actorService.ActorTypeInformation.ImplementationType.ToString(),
             actorService.Context.CodePackageActivationContext.ApplicationTypeName,
             actorService.Context.CodePackageActivationContext.ApplicationName,
             actorService.Context.ServiceTypeName,
             actorService.Context.ServiceName.ToString(),
             actorService.Context.PartitionId,
             actorService.Context.ReplicaId,
             actorService.Context.NodeContext.NodeName,
             correlationId,
             message,
             name,
             title);
     }
 }
Exemple #6
0
 public MainActor(ActorService actorService, ActorId actorId) : base(actorService, actorId)
 {
 }
Exemple #7
0
 protected ActorBase(Microsoft.ServiceFabric.Actors.Runtime.ActorService actorService, ActorId actorId) : base(actorService, actorId)
 {
     _applicationUriBuilder = new ApplicationUriBuilder(actorService.Context.CodePackageActivationContext);
 }
Exemple #8
0
 public NumberActor(ActorService actorService, ActorId actorId) : base(actorService, actorId)
 {
     this._random = new Random(actorId.GetHashCode());
 }