コード例 #1
0
        public void StartHello(
            )
        {
            Sample.Current.StartHello(

                );

            System.Diagnostics.Debug.WriteLine($"[Console] ERR: StartHello");

            _helloStopwatch.Restart();
            var helloOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("hello");

            OperationHolder.StartOperation(helloOperationHolder);
        }
コード例 #2
0
        public void StartLoop(
            )
        {
            Sample.Current.StartLoop(

                );

            System.Diagnostics.Debug.WriteLine($"[ConsoleRunner] ERR: StartLoop");

            _loopStopwatch.Restart();
            var loopOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("loop");

            OperationHolder.StartOperation(loopOperationHolder);
        }
コード例 #3
0
        public void StartLoop(
            )
        {
            DefaultEventSource.Current.StartLoop(
                _processId,
                _machineName,
                _actorId
                );

            var loopOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("loop");

            loopOperationHolder.Telemetry.Properties.Add("ProcessId", _processId.ToString());
            loopOperationHolder.Telemetry.Properties.Add("MachineName", Environment.MachineName);
            loopOperationHolder.Telemetry.Properties.Add("Actor", _actorId.ToString());
            OperationHolder.StartOperation(loopOperationHolder);
        }
コード例 #4
0
        public void StartGetAll(
            )
        {
            WebApiServiceEventSource.Current.StartGetAll(
                _context
                );

            var getAllOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("getAll");

            getAllOperationHolder.Telemetry.Properties.Add("ServiceName", _context.ServiceName.ToString());
            getAllOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _context.ServiceTypeName);
            getAllOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _context.InstanceId.ToString());
            getAllOperationHolder.Telemetry.Properties.Add("PartitionId", _context.PartitionId.ToString());
            getAllOperationHolder.Telemetry.Properties.Add("ApplicationName", _context.CodePackageActivationContext.ApplicationName);
            getAllOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName);
            getAllOperationHolder.Telemetry.Properties.Add("NodeName", _context.NodeContext.NodeName);
            OperationHolder.StartOperation(getAllOperationHolder);
        }
        public void StartRequestContext(
            System.Collections.Generic.IEnumerable <CodeEffect.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestHeader> headers)
        {
            WebApiServiceEventSource.Current.StartRequestContext(
                _context,
                headers
                );

            var requestContextOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("requestContext");

            requestContextOperationHolder.Telemetry.Properties.Add("ServiceName", _context.ServiceName.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _context.ServiceTypeName);
            requestContextOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _context.InstanceId.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("PartitionId", _context.PartitionId.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("ApplicationName", _context.CodePackageActivationContext.ApplicationName);
            requestContextOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName);
            requestContextOperationHolder.Telemetry.Properties.Add("NodeName", _context.NodeContext.NodeName);
            requestContextOperationHolder.Telemetry.Properties.Add("Headers", headers.ToString());
            OperationHolder.StartOperation(requestContextOperationHolder);
        }
コード例 #6
0
        public void StartLoop(
            )
        {
            FGDiagnosticsAutoLoggerSamplesConsoleApplication1EventSource.Current.StartLoop(
                _autogenerated,
                _machineName
                );

            System.Diagnostics.Debug.WriteLine($"[ConsoleRunner] ERR: StartLoop");

            System.Diagnostics.Debug.WriteLine($"\t_autogenerated:\t{_autogenerated}");
            System.Diagnostics.Debug.WriteLine($"\tEnvironment.MachineName:\t{Environment.MachineName}");
            _loopStopwatch.Restart();

            var loopOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("loop");

            loopOperationHolder.Telemetry.Properties.Add("Autogenerated", _autogenerated.ToString());
            loopOperationHolder.Telemetry.Properties.Add("MachineName", Environment.MachineName);
            OperationHolder.StartOperation(loopOperationHolder);
        }
コード例 #7
0
ファイル: ActorLogger.cs プロジェクト: darivuki/FG.AutoLogger
        public void StartActorActive(
            bool firstActivation)
        {
            PersonActorServiceEventSource.Current.StartActorActive(
                _actor,
                firstActivation
                );

            var actorActiveOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("actorActive");

            actorActiveOperationHolder.Telemetry.Properties.Add("ActorType", _actor.ActorType.ToString());
            actorActiveOperationHolder.Telemetry.Properties.Add("ActorId", _actor.ActorId.ToString());
            actorActiveOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _actor.ApplicationTypeName);
            actorActiveOperationHolder.Telemetry.Properties.Add("ApplicationName", _actor.ApplicationName);
            actorActiveOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _actor.ServiceTypeName);
            actorActiveOperationHolder.Telemetry.Properties.Add("ServiceName", _actor.ToString());
            actorActiveOperationHolder.Telemetry.Properties.Add("PartitionId", _actor.PartitionId.ToString());
            actorActiveOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _actor.ReplicaOrInstanceId.ToString());
            actorActiveOperationHolder.Telemetry.Properties.Add("NodeName", _actor.NodeName);
            actorActiveOperationHolder.Telemetry.Properties.Add("FirstActivation", firstActivation.ToString());
            OperationHolder.StartOperation(actorActiveOperationHolder);
        }
コード例 #8
0
        public void StartRequestContext(
            System.Collections.Generic.IEnumerable <FG.ServiceFabric.Services.Remoting.FabricTransport.ServiceRequestHeader> headers)
        {
            PersonActorServiceEventSource.Current.StartRequestContext(
                _actor,
                headers
                );

            var requestContextOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("requestContext");

            requestContextOperationHolder.Telemetry.Properties.Add("ActorType", _actor.ActorType.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("ActorId", _actor.ActorId.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _actor.ApplicationTypeName);
            requestContextOperationHolder.Telemetry.Properties.Add("ApplicationName", _actor.ApplicationName);
            requestContextOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _actor.ServiceTypeName);
            requestContextOperationHolder.Telemetry.Properties.Add("ServiceName", _actor.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("PartitionId", _actor.PartitionId.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _actor.ReplicaOrInstanceId.ToString());
            requestContextOperationHolder.Telemetry.Properties.Add("NodeName", _actor.NodeName);
            requestContextOperationHolder.Telemetry.Properties.Add("Headers", headers.ToString());
            OperationHolder.StartOperation(requestContextOperationHolder);
        }
        public void StartMessageSend(
            System.Uri requestUri,
            CodeEffect.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader headers)
        {
            WebApiServiceEventSource.Current.StartMessageSend(
                _context,
                requestUri,
                headers
                );

            var messageSendOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>(requestUri.ToString());

            messageSendOperationHolder.Telemetry.Properties.Add("ServiceName", _context.ServiceName.ToString());
            messageSendOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _context.ServiceTypeName);
            messageSendOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _context.InstanceId.ToString());
            messageSendOperationHolder.Telemetry.Properties.Add("PartitionId", _context.PartitionId.ToString());
            messageSendOperationHolder.Telemetry.Properties.Add("ApplicationName", _context.CodePackageActivationContext.ApplicationName);
            messageSendOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName);
            messageSendOperationHolder.Telemetry.Properties.Add("NodeName", _context.NodeContext.NodeName);
            messageSendOperationHolder.Telemetry.Properties.Add("RequestUri", requestUri.ToString());
            messageSendOperationHolder.Telemetry.Properties.Add("User", headers?.GetHeader("name"));
            messageSendOperationHolder.Telemetry.Properties.Add("CorrelationId", headers?.GetHeader("correlation-id"));
            OperationHolder.StartOperation(messageSendOperationHolder);
        }
        public void StartActorMessageRecieved(
            string methodName,
            CodeEffect.ServiceFabric.Services.Remoting.FabricTransport.CustomServiceRequestHeader headers)
        {
            WebApiServiceEventSource.Current.StartActorMessageRecieved(
                _context,
                methodName,
                headers
                );

            var actorMessageRecievedOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("actorMessageRecieved");

            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("ServiceName", _context.ServiceName.ToString());
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("ServiceTypeName", _context.ServiceTypeName);
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("ReplicaOrInstanceId", _context.InstanceId.ToString());
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("PartitionId", _context.PartitionId.ToString());
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("ApplicationName", _context.CodePackageActivationContext.ApplicationName);
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("ApplicationTypeName", _context.CodePackageActivationContext.ApplicationTypeName);
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("NodeName", _context.NodeContext.NodeName);
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("MethodName", methodName);
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("User", headers?.GetHeader("name"));
            actorMessageRecievedOperationHolder.Telemetry.Properties.Add("CorrelationId", headers?.GetHeader("correlation-id"));
            OperationHolder.StartOperation(actorMessageRecievedOperationHolder);
        }
        public void StartHello(
            )
        {
            Sample.Current.StartHello(
                _actorId,
                _processId,
                _machineName
                );

            System.Diagnostics.Debug.WriteLine($"[Console] ERR: StartHello");

            System.Diagnostics.Debug.WriteLine($"\t_actorId.ToString():\t{_actorId.ToString()}");
            System.Diagnostics.Debug.WriteLine($"\t_actorId.Kind.ToString():\t{_actorId.Kind.ToString()}");
            System.Diagnostics.Debug.WriteLine($"\t_processId:\t{_processId}");
            System.Diagnostics.Debug.WriteLine($"\tEnvironment.MachineName:\t{Environment.MachineName}");
            _helloStopwatch.Restart();
            var helloOperationHolder = _telemetryClient.StartOperation <RequestTelemetry>("hello");

            helloOperationHolder.Telemetry.Properties.Add("ActorId", _actorId.ToString());
            helloOperationHolder.Telemetry.Properties.Add("ActorIdType", _actorId.Kind.ToString());
            helloOperationHolder.Telemetry.Properties.Add("ProcessId", _processId.ToString());
            helloOperationHolder.Telemetry.Properties.Add("MachineName", Environment.MachineName);
            OperationHolder.StartOperation(helloOperationHolder);
        }