MapboxMetricsReporter

object MapboxMetricsReporter : MetricsReporter

Default implementation of MetricsReporter interface.

Functions

Link copied to clipboard
open override fun addEvent(metricEvent: MetricEvent)

Adds an event to the metrics reporter when this event occurs.

Link copied to clipboard
fun disable()

Disables metrics reporting and ends mapboxTelemetry session. This method also removes metrics observer and stops background thread used for events dispatching.

Link copied to clipboard
fun init(    context: Context,     accessToken: String,     userAgent: String)

Initialize mapboxTelemetry that need to send event to Mapbox Telemetry server.

Link copied to clipboard
open override fun removeObserver()

Remove the MetricsObserver.

Link copied to clipboard
open override fun setMetricsObserver(metricsObserver: MetricsObserver)

Adds a MetricsObserver that will be triggered when a metric event is handled.

Link copied to clipboard
fun toggleLogging(isDebugLoggingEnabled: Boolean)

Toggle whether or not you'd like to log mapboxTelemetry events.