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); }
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; }
protected override void NotifyDataDogEvent(DataDogEvent dataDogEvent) { Events.Add(dataDogEvent); }