Пример #1
0
 protected virtual void NotifyDataDogEvent(DataDogEvent dataDogEvent)
 {
     DogStatsd.Increment(statName: dataDogEvent.StatName, tags: dataDogEvent.Tags);
     DogStatsd.Event(title: dataDogEvent.Title,
                     text: dataDogEvent.Message,
                     alertType: dataDogEvent.AlertType,
                     tags: dataDogEvent.Tags);
 }
Пример #2
0
        private DataDogEvent ConvertToDataDogEvent(NotificationLevel level, string layerName, string checkName, params string[] messages)
        {
            var dataDogEvent = new DataDogEvent
            {
                StatName = MetricsName,
                Title = checkName,
                AlertType = ConvertToAlertType(level)
            };

            var message = string.Join(Environment.NewLine, messages);
            message = message.Truncate(settings.MessageLengthLimit);
            dataDogEvent.Message = message;

            dataDogEvent.AddTag("check", checkName);
            dataDogEvent.AddTag("layer", layerName);
            dataDogEvent.AddTag("level", level.ToString());

            return dataDogEvent;
        }
Пример #3
0
 protected override void NotifyDataDogEvent(DataDogEvent dataDogEvent)
 {
     Events.Add(dataDogEvent);
 }