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()

The method disables navigation telemetry, removes metrics observer and stops background thread used for events dispatching.

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

Initialize EventsServiceInterface and TelemetryService 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 sendTurnstileEvent(turnstileEvent: TurnstileEvent)

Send TurnstileEvent event.

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.