Beispiel #1
0
        public void ServiceCheck(string name, string status, int?timestamp = null, string hostName = null, string[] tags = null, string serviceCheckMessage = null, bool truncateText = true)
        {
            if (isNull)
            {
                return;
            }

            var command = DogStatsDFormatter.ServiceCheck(name, status, timestamp, hostName, WithDefaultTag(tags), serviceCheckMessage, truncateText);

            Send(command);
        }
Beispiel #2
0
        public void Event(string title, string text, int?dateHappened = null, string hostName = null, string aggregationKey = null, Priority priority = Priority.Normal, string sourceTypeName = null, AlertType alertType = AlertType.Info, string[] tags = null, bool truncateText = true)
        {
            if (isNull)
            {
                return;
            }

            var command = DogStatsDFormatter.Event(title, text, dateHappened, hostName, aggregationKey, priority, sourceTypeName, alertType, WithDefaultTag(tags), truncateText);

            Send(command);
        }
Beispiel #3
0
 public void Counter(string metricName, long value, double sampleRate = 1.0, string[] tags = null)
 {
     if (isNull)
     {
         return;
     }
     if (sampleRate == 1.0 || sampleRate < ThreadSafeUtil.ThreadStaticRandom.NextDouble())
     {
         var command = DogStatsDFormatter.Counter(WithPrefix(metricName), value, sampleRate, WithDefaultTag(tags));
         Send(command);
     }
 }