Source:
<code>protected String getGOCMessageBody(Notification notification, Trigger trigger, NotificationContext context) { StringBuilder sb = new StringBuilder(); Alert currentAlert = notification.getAlert(); String expression = getExpressionWithAbsoluteStartAndEndTimeStamps(context); sb.append(MessageFormat.format("Alert {0} with id {1} was triggered at {2}\n", context.getAlert().getName(), context.getAlert().getId().intValue(), DATE_FORMATTER.get().format(new Date(context.getTriggerFiredTime())))); if(context.getNotification().getCustomText() != null && context.getNotification().getCustomText().length()>0){ sb.append(context.getNotification().getCustomText()).append("\n"); } if(currentAlert.getNotifications().size() > 1) sb.append(MessageFormat.format("Notification: {0}\n", notification.getName())); if(currentAlert.getTriggers().size() > 1) sb.append(MessageFormat.format("Triggered by: {0}\n", trigger.getName())); sb.append(MessageFormat.format("Notification is on cooldown until: {0}\n", DATE_FORMATTER.get().format(new Date(context.getCoolDownExpiration())))); <START> sb.append(MessageFormat.format("Evaluated metric expression: {0}\n", expression)); <END> if(!trigger.getType().equals(TriggerType.NO_DATA)){ sb.append(MessageFormat.format("Triggered on Metric: {0}\n", context.getTriggeredMetric().getIdentifier())); } sb.append(MessageFormat.format("Trigger details: {0}\n", getTriggerDetails(trigger, context))); if(!trigger.getType().equals(TriggerType.NO_DATA)){ sb.append(MessageFormat.format("Triggering event value: {0}\n", context.getTriggerEventValue())); } sb.append("\n"); for (String metricToAnnotate : notification.getMetricsToAnnotate()) { sb.append(MessageFormat.format("Annotated series for {0}: {1}\n", metricToAnnotate, getMetricUrl(metricToAnnotate, context.getTriggerFiredTime()))); } sb.append("\n"); sb.append(MessageFormat.format("Metric Datapoints: {0}\n", getMetricUrl(expression))); sb.append(MessageFormat.format("Alert definition: {0}\n", getAlertUrl(notification.getAlert().getId()))); return sb.toString(); }</code><technical_language>I need this anymore</technical_language>

Target:
protected String getGOCMessageBody(Notification notification, Trigger trigger, NotificationContext context) { StringBuilder sb = new StringBuilder(); Alert currentAlert = notification.getAlert(); String expression = getExpressionWithAbsoluteStartAndEndTimeStamps(context); sb.append(MessageFormat.format("Alert {0} with id {1} was triggered at {2}\n", context.getAlert().getName(), context.getAlert().getId().intValue(), DATE_FORMATTER.get().format(new Date(context.getTriggerFiredTime())))); if(context.getNotification().getCustomText() != null && context.getNotification().getCustomText().length()>0){ sb.append(context.getNotification().getCustomText()).append("\n"); } if(currentAlert.getNotifications().size() > 1) sb.append(MessageFormat.format("Notification: {0}\n", notification.getName())); if(currentAlert.getTriggers().size() > 1) sb.append(MessageFormat.format("Triggered by: {0}\n", trigger.getName())); sb.append(MessageFormat.format("Notification is on cooldown until: {0}\n", DATE_FORMATTER.get().format(new Date(context.getCoolDownExpiration())))); sb.append(MessageFormat.format("Evaluated metric expression: {0}\n", expression)); if(!trigger.getType().equals(TriggerType.NO_DATA)){ sb.append(MessageFormat.format("Triggered on Metric: {0}\n", context.getTriggeredMetric().getIdentifier())); } sb.append(MessageFormat.format("Trigger details: {0}\n", getTriggerDetails(trigger, context))); if(!trigger.getType().equals(TriggerType.NO_DATA)){ sb.append(MessageFormat.format("Triggering event value: {0}\n", context.getTriggerEventValue())); } sb.append("\n"); for (String metricToAnnotate : notification.getMetricsToAnnotate()) { sb.append(MessageFormat.format("Annotated series for {0}: {1}\n", metricToAnnotate, getMetricUrl(metricToAnnotate, context.getTriggerFiredTime()))); } sb.append("\n"); sb.append(MessageFormat.format("Evaluated Metric datapoints: {0}\n", getExpressionUrl(expression))); sb.append(MessageFormat.format("Alert definition: {0}\n", getAlertUrl(notification.getAlert().getId()))); return sb.toString(); }