public class RollbarTelemetryEventTracker extends java.lang.Object implements TelemetryEventTracker
TelemetryEventTracker.| Modifier and Type | Field and Description |
|---|---|
static int |
MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS |
| Constructor and Description |
|---|
RollbarTelemetryEventTracker(Provider<java.lang.Long> timestampProvider,
int maximumTelemetryData)
Construct a
RollbarTelemetryEventTracker. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<com.rollbar.api.payload.data.TelemetryEvent> |
dump()
Dump all the events recorded.
|
void |
recordLogEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String message)
Record log telemetry event.
|
void |
recordManualEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String message)
Record manual telemetry event.
|
void |
recordNavigationEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String from,
java.lang.String to)
Record navigation telemetry event with from (origin) and to (destination).
|
void |
recordNetworkEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String method,
java.lang.String url,
java.lang.String statusCode)
Record network telemetry event with method, url, and status code.
|
public static final int MAXIMUM_CAPACITY_FOR_TELEMETRY_EVENTS
public RollbarTelemetryEventTracker(Provider<java.lang.Long> timestampProvider, int maximumTelemetryData)
RollbarTelemetryEventTracker.timestampProvider - A Provider of timestamps for the eventsmaximumTelemetryData - Maximum number of accumulated events (This value can be between 0
and 100, exceed any of these thresholds and the closest will be
taken)public java.util.List<com.rollbar.api.payload.data.TelemetryEvent> dump()
TelemetryEventTrackerdump in interface TelemetryEventTrackerpublic void recordLogEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String message)
TelemetryEventTrackerTelemetryType.LOG).recordLogEventFor in interface TelemetryEventTrackerlevel - the TelemetryEvent severity (e.g. Level.DEBUG).source - the Source this event is recorded from (e.g. Source.CLIENT).message - the message sent for this event (e.g. "hello world").public void recordManualEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String message)
TelemetryEventTrackerTelemetryType.MANUAL) .recordManualEventFor in interface TelemetryEventTrackerlevel - the TelemetryEvent severity (e.g. Level.DEBUG).source - the Source this event is recorded from (e.g. Source.CLIENT).message - the message sent for this event (e.g. "hello world").public void recordNavigationEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String from,
java.lang.String to)
TelemetryEventTrackerTelemetryType.NAVIGATION).recordNavigationEventFor in interface TelemetryEventTrackerlevel - the TelemetryEvent severity (e.g. Level.DEBUG).source - the Source this event is recorded from (e.g. Source.CLIENT).from - the starting point (e.g. "SettingView").to - the destination point (e.g. "HomeView").public void recordNetworkEventFor(com.rollbar.api.payload.data.Level level,
com.rollbar.api.payload.data.Source source,
java.lang.String method,
java.lang.String url,
java.lang.String statusCode)
TelemetryEventTrackerTelemetryType.NETWORK).recordNetworkEventFor in interface TelemetryEventTrackerlevel - the TelemetryEvent severity (e.g. Level.DEBUG).source - the Source this event is recorded from (e.g. Source.CLIENT).method - the verb used (e.g. "POST").url - the api url (e.g. "
http://rollbar.com/test/api").statusCode - the response status code (e.g. "404").