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

com.rollbar.notifier.telemetry.TelemetryEventTracker Maven / Gradle / Ivy

Go to download

For connecting your applications built on the JVM to Rollbar for Error Reporting

The newest version!
package com.rollbar.notifier.telemetry;

import com.rollbar.api.payload.data.Level;
import com.rollbar.api.payload.data.Source;
import com.rollbar.api.payload.data.TelemetryEvent;
import com.rollbar.api.payload.data.TelemetryType;

import java.util.List;

public interface TelemetryEventTracker {

  /**
   * Dump all the events recorded.
   */
  List dump();

  /**
   * Record log telemetry event. ({@link TelemetryType#LOG}).
   *
   * @param level the TelemetryEvent severity (e.g. {@link Level#DEBUG}).
   * @param source the {@link Source} this event is recorded from (e.g. {@link Source#CLIENT}).
   * @param message the message sent for this event (e.g. "hello world").
   */
  void recordLogEventFor(Level level, Source source, String message);

  /**
   * Record manual telemetry event. ({@link TelemetryType#MANUAL}) .
   *
   * @param level   the TelemetryEvent severity (e.g. {@link Level#DEBUG}).
   * @param source the {@link Source} this event is recorded from (e.g. {@link Source#CLIENT}).
   * @param message the message sent for this event (e.g. "hello world").
   */
  void recordManualEventFor(Level level, Source source, String message);

  /**
   * Record navigation telemetry event with from (origin) and to (destination).
   * ({@link TelemetryType#NAVIGATION}).
   *
   * @param level the TelemetryEvent severity (e.g. {@link Level#DEBUG}).
   * @param source the {@link Source} this event is recorded from (e.g. {@link Source#CLIENT}).
   * @param from  the starting point (e.g. "SettingView").
   * @param to    the destination point (e.g. "HomeView").
   */
  void recordNavigationEventFor(Level level, Source source, String from, String to);

  /**
   * Record network telemetry event with method, url, and status code.
   * ({@link TelemetryType#NETWORK}).
   *
   * @param level      the TelemetryEvent severity (e.g. {@link Level#DEBUG}).
   * @param source the {@link Source} this event is recorded from (e.g. {@link Source#CLIENT}).
   * @param method     the verb used (e.g. "POST").
   * @param url        the api url (e.g. "
   *                   http://rollbar.com/test/api").
   * @param statusCode the response status code (e.g. "404").
   */
  void recordNetworkEventFor(
      Level level,
      Source source,
      String method,
      String url,
      String statusCode
  );
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy