Example #1
0
        public static void TrackActorStopped(string name)
        {
            if (!MonitoringSystems.IsEnabled)
            {
                return;
            }

            MonitoringSystems.TrackEvent(MetricEvents.ActorStopped, MetricProperties.For().Actor(name).Build());
            MonitoringSystems.UpdateCounter(MetricCounters.ActorsStopped);
            MonitoringSystems.UpdateCounter(MetricCounters.ActorCounter(MetricCounters.ActorStopped, name));
        }
Example #2
0
        public static void TrackActorCreated(string name, Type type, string parentName)
        {
            if (!MonitoringSystems.IsEnabled)
            {
                return;
            }

            MonitoringSystems.TrackEvent(MetricEvents.ActorCreated, MetricProperties.For().Actor(name).Type(type).ActorParent(parentName).Build());
            MonitoringSystems.UpdateCounter(MetricCounters.ActorsCreated);
            MonitoringSystems.UpdateCounter(MetricCounters.ActorCounter(MetricCounters.ActorCreated, name));
        }
Example #3
0
        public static void TrackReceivedMessage(string name, object message)
        {
            if (!MonitoringSystems.IsEnabled || !TrackReceivedMessagesEnabled)
            {
                return;
            }

            MonitoringSystems.TrackEvent(MetricEvents.ActorReceivedMessage, MetricProperties.For()
                                         .Actor(name)
                                         .Type(message.GetType())
                                         .Message(message)
                                         .Build());
        }
Example #4
0
        public static void TrackActorRestarted(string name, Exception ex)
        {
            if (!MonitoringSystems.IsEnabled)
            {
                return;
            }

            MonitoringSystems.TrackEvent(MetricEvents.ActorRestarted, MetricProperties.For()
                                         .Actor(name)
                                         .Exception(ex)
                                         .Build());
            MonitoringSystems.UpdateCounter(MetricCounters.ActorsRestarted);
            MonitoringSystems.UpdateCounter(MetricCounters.ActorCounter(MetricCounters.ActorRestarted, name));
        }
Example #5
0
        public static void TrackException(string name, Exception exception, object message)
        {
            if (!MonitoringSystems.IsEnabled)
            {
                return;
            }

            MonitoringSystems.TrackException(exception, MetricProperties.For()
                                             .Actor(name)
                                             .Type(message.GetType())
                                             .Message(message)
                                             .Build());
            MonitoringSystems.UpdateCounter(MetricCounters.ActorsExceptions);
            MonitoringSystems.UpdateCounter(MetricCounters.ActorCounter(MetricCounters.ActorExceptions, name));
        }
Example #6
0
        public static void TrackDeadLetter(string sender, string recipient, object message)
        {
            if (!MonitoringSystems.IsEnabled)
            {
                return;
            }

            MonitoringSystems.TrackEvent(MetricEvents.ActorDeadLetter, MetricProperties.For()
                                         .Actor(sender)
                                         .ActorRecipient(recipient)
                                         .Type(message.GetType())
                                         .Message(message)
                                         .Build());
            MonitoringSystems.UpdateCounter(MetricCounters.ActorsDeadLetters);
        }