com.yandex.metrica.plugins
Interface YandexMetricaPlugins
public interface YandexMetricaPlugins
YandexMetricaPlugins
is an extension of YandexMetrica
.
YandexMetricaPlugins
can be obtained via YandexMetrica.getPluginExtension()
method call. For every app process only one YandexMetricaPlugins
instance is created. You can either query it each time you need it, or save the reference by yourself.
NOTE: to use this extension you must activate AppMetrica first via
YandexMetrica.activate(android.content.Context, com.yandex.metrica.YandexMetricaConfig)
.- See Also:
YandexMetrica.getPluginExtension()
Method Summary
Modifier and Type | Method and Description |
---|---|
void | reportError(PluginErrorDetails errorDetails, java.lang.String message)
Reports error from plugin.
|
void | reportError(java.lang.String identifier, java.lang.String message, PluginErrorDetails errorDetails)
Reports error from plugin.
|
void | reportUnhandledException(PluginErrorDetails errorDetails)
Reports unhandled exception from plugin.
|
Method Detail
reportUnhandledException
void reportUnhandledException(@NonNull PluginErrorDetails errorDetails)
Reports unhandled exception from plugin.
- Parameters:
errorDetails
- Object describing the exception.- See Also:
PluginErrorDetails
reportError
void reportError(@NonNull PluginErrorDetails errorDetails, @Nullable java.lang.String message)
Reports error from plugin. Use this method to report an unexpected situation. If you use this method errors will be grouped by
errorDetails
stacktrace. If you want to influence the way errors are grouped use reportError(String, String, PluginErrorDetails)
- Parameters:
errorDetails
- Object describing the error. For the error to be sent, errorDetails must contain non empty stacktrace. Otherwise it will be ignored. If you can't provide stacktrace, usereportError(String, String, PluginErrorDetails)
with filled identifier.message
- Short description or name of the error.- See Also:
PluginErrorDetails
reportError
void reportError(@NonNull java.lang.String identifier, @Nullable java.lang.String message, @Nullable PluginErrorDetails errorDetails)
Reports error from plugin. Use this method to report an unexpected situation. This method should be used if you want to customize error grouping. If not use
reportError(PluginErrorDetails, String)
- Parameters:
identifier
- An identifier used for grouping errors. Errors that have the same identifiers will belong in one group. Do not use dynamically formed strings or exception messages as identifiers to avoid having too many small crash groups.message
- Short description or name of the error.errorDetails
- Object describing the error.- See Also:
PluginErrorDetails