All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.newrelic.telemetry.NotificationHandler Maven / Gradle / Ivy

There is a newer version: 0.16.0
Show newest version
package com.newrelic.telemetry;

/** To handle notifications, an implementation of this interface must be provided. */
public interface NotificationHandler {

  /**
   * Notice info events.
   *
   * @param message the message provided by {@link TelemetryClient}
   * @param batch the telemetry batch that was sent
   */
  default void noticeInfo(String message, TelemetryBatch batch) {
    noticeInfo(message, null, batch);
  }

  /**
   * Notice info events.
   *
   * @param message the message provided by {@link TelemetryClient}
   * @param exception the Exception provided by {@link TelemetryClient}
   * @param batch the telemetry batch that was sent
   */
  void noticeInfo(String message, Exception exception, TelemetryBatch batch);

  /**
   * Notice error events.
   *
   * @param message the message provided by {@link TelemetryClient}
   * @param batch the telemetry batch that was sent
   */
  default void noticeError(String message, TelemetryBatch batch) {
    noticeError(message, null, batch);
  }

  /**
   * Notice error events.
   *
   * @param message the message provided by {@link TelemetryClient}
   * @param throwable the throwable provided by {@link TelemetryClient}
   * @param batch the telemetry batch that was sent
   */
  void noticeError(String message, Throwable throwable, TelemetryBatch batch);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy