Package com.rollbar.notifier.telemetry
Interface TelemetryEventTracker
- All Known Implementing Classes:
RollbarTelemetryEventTracker
public interface TelemetryEventTracker
Collects and manages telemetry events that provide additional runtime
context for error and message payloads.
Telemetry events are typically buffered and retrieved via
getAll().-
Method Summary
Modifier and TypeMethodDescriptionList<com.rollbar.api.payload.data.TelemetryEvent>getAll()Get all the events recorded.voidrecordLogEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String message) Record log telemetry event.voidrecordManualEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String message) Record manual telemetry event.voidrecordNavigationEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String from, String to) Record navigation telemetry event with from (origin) and to (destination).voidrecordNetworkEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String method, String url, String statusCode) Record network telemetry event with method, url, and status code.
-
Method Details
-
getAll
List<com.rollbar.api.payload.data.TelemetryEvent> getAll()Get all the events recorded. -
recordLogEventFor
void recordLogEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String message) Record log telemetry event. (TelemetryType.LOG).- Parameters:
level- the TelemetryEvent severity (e.g.Level.DEBUG).source- theSourcethis event is recorded from (e.g.Source.CLIENT).message- the message sent for this event (e.g. "hello world").
-
recordManualEventFor
void recordManualEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String message) Record manual telemetry event. (TelemetryType.MANUAL) .- Parameters:
level- the TelemetryEvent severity (e.g.Level.DEBUG).source- theSourcethis event is recorded from (e.g.Source.CLIENT).message- the message sent for this event (e.g. "hello world").
-
recordNetworkEventFor
void recordNetworkEventFor(com.rollbar.api.payload.data.Level level, com.rollbar.api.payload.data.Source source, String method, String url, String statusCode) Record network telemetry event with method, url, and status code. (TelemetryType.NETWORK).- Parameters:
level- the TelemetryEvent severity (e.g.Level.DEBUG).source- theSourcethis 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").
-