-
- All Implemented Interfaces:
-
io.embrace.android.embracesdk.BugShakeApi,io.embrace.android.embracesdk.EmbraceAndroidApi,io.embrace.android.embracesdk.EmbraceApi,io.embrace.android.embracesdk.LogsApi,io.embrace.android.embracesdk.MomentsApi,io.embrace.android.embracesdk.NetworkRequestApi,io.embrace.android.embracesdk.SessionApi,io.embrace.android.embracesdk.UserApi,io.embrace.android.embracesdk.spans.TracingApi
public final class Embrace implements EmbraceAndroidApiEntry point for the SDK. This class is part of the Embrace Public API.
Contains a singleton instance of itself, and is used for initializing the SDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumEmbrace.BugReportCategorypublic enumEmbrace.AppFrameworkThe AppFramework that is in use.
public enumEmbrace.LastRunEndStateEnum representing the end state of the last run of the application.
-
Method Summary
Modifier and Type Method Description static EmbracegetInstance()Gets the singleton instance of the Embrace SDK. voidstart(@NonNull() Context context)Starts instrumentation of the Android application using the Embrace SDK. voidstart(@NonNull() Context context, boolean enableIntegrationTesting)Starts instrumentation of the Android application using the Embrace SDK. voidstart(@NonNull() Context context, boolean enableIntegrationTesting, @NonNull() Embrace.AppFramework appFramework)Starts instrumentation of the Android application using the Embrace SDK. booleanisStarted()Whether or not the SDK has been started. booleansetAppId(@NonNull() String appId)Sets a custom app ID that overrides the one specified at build time. voidsetUserIdentifier(@Nullable() String userId)voidclearUserIdentifier()voidsetUserEmail(@Nullable() String email)voidclearUserEmail()voidsetUserAsPayer()voidclearUserAsPayer()voidaddUserPersona(@NonNull() String persona)voidclearUserPersona(@NonNull() String persona)voidclearAllUserPersonas()booleanaddSessionProperty(@NonNull() String key, @NonNull() String value, boolean permanent)booleanremoveSessionProperty(@NonNull() String key)Map<String, String>getSessionProperties()voidsetUsername(@Nullable() String username)voidclearUsername()voidstartMoment(@NonNull() String name)Starts a 'moment'. voidstartMoment(@NonNull() String name, @Nullable() String identifier)Starts a 'moment'. voidstartMoment(@NonNull() String name, @Nullable() String identifier, @Nullable() Map<String, Object> properties)Starts a 'moment'. voidendMoment(@NonNull() String name)Signals the end of a moment with the specified name. voidendMoment(@NonNull() String name, @Nullable() String identifier)Signals the end of a moment with the specified name. voidendMoment(@NonNull() String name, @Nullable() Map<String, Object> properties)Signals the end of a moment with the specified name. voidendMoment(@NonNull() String name, @Nullable() String identifier, @Nullable() Map<String, Object> properties)Signals the end of a moment with the specified name. voidendAppStartup()Signals that the app has completed startup. voidendAppStartup(@NonNull() Map<String, Object> properties)Signals that the app has completed startup. StringgetTraceIdHeader()Retrieve the HTTP request header to extract trace ID from. StringgenerateW3cTraceparent()Randomly generate a W3C-compliant traceparent voidrecordNetworkRequest(@NonNull() EmbraceNetworkRequest networkRequest)voidlogInfo(@NonNull() String message)Remotely logs a message at INFO level. voidlogWarning(@NonNull() String message)Remotely logs a message at WARN level. voidlogError(@NonNull() String message)Remotely logs a message at ERROR level. voidlogRnAction(@NonNull() String name, long startTime, long endTime, @NonNull() Map<String, Object> properties, int bytesSent, @NonNull() String output)Logs a React Native Redux Action. voidaddBreadcrumb(@NonNull() String message)Adds a breadcrumb. voidlogMessage(@NonNull() String message, @NonNull() Severity severity)Remotely logs a message at the given severity level. voidlogMessage(@NonNull() String message, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)Remotely logs a message at the given severity level. voidlogException(@NonNull() Throwable throwable)Remotely logs a Throwable/Exception at ERROR level. voidlogException(@NonNull() Throwable throwable, @NonNull() Severity severity)Remotely logs a Throwable/Exception at given severity level. voidlogException(@NonNull() Throwable throwable, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)Remotely logs a Throwable/Exception at given severity level. voidlogException(@NonNull() Throwable throwable, @NonNull() Severity severity, @Nullable() Map<String, Object> properties, @Nullable() String message)Remotely logs a Throwable/Exception at given severity level. voidlogCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements)Remotely logs a custom stacktrace at ERROR level. voidlogCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity)Remotely logs a custom stacktrace at given severity level. voidlogCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)Remotely logs a custom stacktrace at given severity level. voidlogCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity, @Nullable() Map<String, Object> properties, @Nullable() String message)Remotely logs a custom stacktrace at given severity level. voidlogBugReport(@NonNull() Embrace.BugReportCategory bugReportCategory, @NonNull() String bugReportMessage)voidshowBugReportForm()voidlogInternalError(@Nullable() String message, @Nullable() String details)Logs an internal error to the Embrace SDK - this is not intended for public use. voidlogInternalError(@NonNull() Throwable error)Logs an internal error to the Embrace SDK - this is not intended for public use. synchronized voidendSession()synchronized voidendSession(boolean clearUserInfo)StringgetDeviceId()Get the user identifier assigned to the device by Embrace booleanstartView(@NonNull() String name)Records that a view 'started'. booleanendView(@NonNull() String name)Records that a view 'ended'. voidlogRnView(@NonNull() String screen)Logs the fact that a particular view was entered. ConfigServicegetConfigService()booleanisTracingAvailable()EmbraceSpancreateSpan(@NonNull() String name)EmbraceSpancreateSpan(@NonNull() String name, @Nullable() EmbraceSpan parent)<T> TrecordSpan(@NonNull() String name, @NonNull() Function0<out T> code)<T> TrecordSpan(@NonNull() String name, @Nullable() EmbraceSpan parent, @NonNull() Function0<out T> code)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode, @Nullable() EmbraceSpan parent, @Nullable() Map<String, String> attributes, @Nullable() List<EmbraceSpanEvent> events)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() EmbraceSpan parent)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode, @Nullable() EmbraceSpan parent)booleanrecordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() Map<String, String> attributes, @Nullable() List<EmbraceSpanEvent> events)ReactNativeInternalInterfacegetReactNativeInternalInterface()Gets the ReactNativeInternalInterface that should be used as the sole source ofcommunication with the Android SDK for React Native. UnityInternalInterfacegetUnityInternalInterface()Gets the UnityInternalInterface that should be used as the sole source ofcommunication with the Android SDK for Unity. FlutterInternalInterfacegetFlutterInternalInterface()Gets the FlutterInternalInterface that should be used as the sole source ofcommunication with the Android SDK for Flutter. voidlogHandledDartException(@Nullable() String stack, @Nullable() String name, @Nullable() String message, @Nullable() String context, @Nullable() String library)Logs a handled Dart error to the Embrace SDK - this is not intended for public use. voidlogUnhandledDartException(@Nullable() String stack, @Nullable() String name, @Nullable() String message, @Nullable() String context, @Nullable() String library)Logs an unhandled Dart error to the Embrace SDK - this is not intended for public use. voidsampleCurrentThreadDuringAnrs()voidlogComposeTap(@NonNull() Pair<Float, Float> point, @NonNull() String elementName)Logs taps from Compose views voidlogPushNotification(@Nullable() String title, @Nullable() String body, @Nullable() String topic, @Nullable() String id, @Nullable() Integer notificationPriority, @NonNull() Integer messageDeliveredPriority, @NonNull() Boolean isNotification, @NonNull() Boolean hasData)Saves captured push notification information into session payload booleanshouldCaptureNetworkBody(@NonNull() String url, @NonNull() String method)Determine if a network call should be captured based on the network capture rules voidsetProcessStartedByNotification()voidtrackWebViewPerformance(@NonNull() String tag, @NonNull() ConsoleMessage consoleMessage)Listen to performance-tracking JavaScript previously embedded in the website's code.The WebView being tracked must have JavaScript enabled. voidtrackWebViewPerformance(@NonNull() String tag, @NonNull() String message)Listen to performance-tracking JavaScript previously embedded in the website's code.The WebView being tracked must have JavaScript enabled. StringgetCurrentSessionId()Get the ID for the current session.Returns null if a session has not been started yet or the SDK hasn't been initialized. Embrace.LastRunEndStategetLastRunEndState()Get the end state of the last run of the application. -
Methods inherited from class io.embrace.android.embracesdk.EmbraceAndroidApi
start, start -
Methods inherited from class io.embrace.android.embracesdk.LogsApi
logCustomStacktrace, logCustomStacktrace, logCustomStacktrace, logException, logException, logException, logMessage, logMessage, logPushNotification -
Methods inherited from class io.embrace.android.embracesdk.MomentsApi
endMoment, endMoment, startMoment -
Methods inherited from class io.embrace.android.embracesdk.NetworkRequestApi
recordNetworkRequest -
Methods inherited from class io.embrace.android.embracesdk.SessionApi
addSessionProperty, endSession, getSessionProperties, removeSessionProperty -
Methods inherited from class io.embrace.android.embracesdk.UserApi
addUserPersona, clearAllUserPersonas, clearUserAsPayer, clearUserEmail, clearUserIdentifier, clearUserPersona, clearUsername, setUserAsPayer, setUserEmail, setUserIdentifier, setUsername -
Methods inherited from class io.embrace.android.embracesdk.spans.TracingApi
createSpan, isTracingAvailable, recordCompletedSpan, recordSpan -
Methods inherited from class io.embrace.android.embracesdk.BugShakeApi
logBugReport, showBugReportForm -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getInstance
@NonNull() static Embrace getInstance()
Gets the singleton instance of the Embrace SDK.
-
start
void start(@NonNull() Context context)
Starts instrumentation of the Android application using the Embrace SDK. This should becalled during creation of the application, as early as possible.
See Embrace Docs forintegration instructions. For compatibility with other networking SDKs such as Akamai,the Embrace SDK must be initialized after any other SDK.
- Parameters:
context- an instance of the application context
-
start
void start(@NonNull() Context context, boolean enableIntegrationTesting)
Starts instrumentation of the Android application using the Embrace SDK. This should becalled during creation of the application, as early as possible.
See Embrace Docs forintegration instructions. For compatibility with other networking SDKs such as Akamai,the Embrace SDK must be initialized after any other SDK.
- Parameters:
context- an instance of contextenableIntegrationTesting- if true, debug sessions (those which are not part of arelease APK) will go to the live integration testing tabof the dashboard.
-
start
void start(@NonNull() Context context, boolean enableIntegrationTesting, @NonNull() Embrace.AppFramework appFramework)
Starts instrumentation of the Android application using the Embrace SDK. This should becalled during creation of the application, as early as possible.
See Embrace Docs forintegration instructions. For compatibility with other networking SDKs such as Akamai,the Embrace SDK must be initialized after any other SDK.
- Parameters:
context- an instance of contextenableIntegrationTesting- if true, debug sessions (those which are not part of arelease APK) will go to the live integration testing tabof the dashboard.
-
isStarted
boolean isStarted()
Whether or not the SDK has been started.
-
setAppId
boolean setAppId(@NonNull() String appId)
Sets a custom app ID that overrides the one specified at build time. Must be called beforethe SDK is started.
- Parameters:
appId- custom app ID
-
setUserIdentifier
void setUserIdentifier(@Nullable() String userId)
-
clearUserIdentifier
void clearUserIdentifier()
-
setUserEmail
void setUserEmail(@Nullable() String email)
-
clearUserEmail
void clearUserEmail()
-
setUserAsPayer
void setUserAsPayer()
-
clearUserAsPayer
void clearUserAsPayer()
-
addUserPersona
void addUserPersona(@NonNull() String persona)
-
clearUserPersona
void clearUserPersona(@NonNull() String persona)
-
clearAllUserPersonas
void clearAllUserPersonas()
-
addSessionProperty
boolean addSessionProperty(@NonNull() String key, @NonNull() String value, boolean permanent)
-
removeSessionProperty
boolean removeSessionProperty(@NonNull() String key)
-
getSessionProperties
@Nullable() Map<String, String> getSessionProperties()
-
setUsername
void setUsername(@Nullable() String username)
-
clearUsername
void clearUsername()
-
startMoment
void startMoment(@NonNull() String name)
Starts a 'moment'. Moments are used for encapsulating particular activities withinthe app, such as a user adding an item to their shopping cart.
The length of time a moment takes to execute is recorded.
- Parameters:
name- a name identifying the moment
-
startMoment
void startMoment(@NonNull() String name, @Nullable() String identifier)
Starts a 'moment'. Moments are used for encapsulating particular activities withinthe app, such as a user adding an item to their shopping cart.
The length of time a moment takes to execute is recorded.
- Parameters:
name- a name identifying the momentidentifier- an identifier distinguishing between multiple moments with the same name
-
startMoment
void startMoment(@NonNull() String name, @Nullable() String identifier, @Nullable() Map<String, Object> properties)
Starts a 'moment'. Moments are used for encapsulating particular activities withinthe app, such as a user adding an item to their shopping cart.
The length of time a moment takes to execute is recorded
- Parameters:
name- a name identifying the momentidentifier- an identifier distinguishing between multiple moments with the same nameproperties- custom key-value pairs to provide with the moment
-
endMoment
void endMoment(@NonNull() String name)
Signals the end of a moment with the specified name.
The duration of the moment is computed.
- Parameters:
name- the name of the moment to end
-
endMoment
void endMoment(@NonNull() String name, @Nullable() String identifier)
Signals the end of a moment with the specified name.
The duration of the moment is computed.
- Parameters:
name- the name of the moment to endidentifier- the identifier of the moment to end, distinguishing between moments with the same name
-
endMoment
void endMoment(@NonNull() String name, @Nullable() Map<String, Object> properties)
Signals the end of a moment with the specified name.
The duration of the moment is computed.
- Parameters:
name- the name of the moment to endproperties- custom key-value pairs to provide with the moment
-
endMoment
void endMoment(@NonNull() String name, @Nullable() String identifier, @Nullable() Map<String, Object> properties)
Signals the end of a moment with the specified name.
The duration of the moment is computed.
- Parameters:
name- the name of the moment to endidentifier- the identifier of the moment to end, distinguishing between moments with the same nameproperties- custom key-value pairs to provide with the moment
-
endAppStartup
void endAppStartup()
Signals that the app has completed startup.
-
endAppStartup
void endAppStartup(@NonNull() Map<String, Object> properties)
Signals that the app has completed startup.
- Parameters:
properties- properties to include as part of the startup moment
-
getTraceIdHeader
@NonNull() String getTraceIdHeader()
Retrieve the HTTP request header to extract trace ID from.
-
generateW3cTraceparent
@NonNull() String generateW3cTraceparent()
Randomly generate a W3C-compliant traceparent
-
recordNetworkRequest
void recordNetworkRequest(@NonNull() EmbraceNetworkRequest networkRequest)
-
logInfo
void logInfo(@NonNull() String message)
Remotely logs a message at INFO level. These log messages will appear as part of the sessiontimeline, and can be used to describe what was happening at a particular time within the app.
- Parameters:
message- the message to remotely log
-
logWarning
void logWarning(@NonNull() String message)
Remotely logs a message at WARN level. These log messages will appear as part of the sessiontimeline, and can be used to describe what was happening at a particular time within the app.
- Parameters:
message- the message to remotely log
-
logError
void logError(@NonNull() String message)
Remotely logs a message at ERROR level. These log messages will appear as part of the sessiontimeline, and can be used to describe what was happening at a particular time within the app.
- Parameters:
message- the message to remotely log
-
logRnAction
void logRnAction(@NonNull() String name, long startTime, long endTime, @NonNull() Map<String, Object> properties, int bytesSent, @NonNull() String output)
Logs a React Native Redux Action.
-
addBreadcrumb
void addBreadcrumb(@NonNull() String message)
Adds a breadcrumb.
Breadcrumbs track a user's journey through the application and will be shown on the timeline.
- Parameters:
message- the name of the breadcrumb to log
-
logMessage
void logMessage(@NonNull() String message, @NonNull() Severity severity)
Remotely logs a message at the given severity level. These log messages will appear as part of the sessiontimeline, and can be used to describe what was happening at a particular time within the app.
- Parameters:
message- the message to remotely logseverity- the severity level of the log message
-
logMessage
void logMessage(@NonNull() String message, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)
Remotely logs a message at the given severity level. These log messages will appear as part of the sessiontimeline, and can be used to describe what was happening at a particular time within the app.
- Parameters:
message- the message to remotely logseverity- the severity level of the log messageproperties- the properties to attach to the log message
-
logException
void logException(@NonNull() Throwable throwable)
Remotely logs a Throwable/Exception at ERROR level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
throwable- the throwable to remotely log
-
logException
void logException(@NonNull() Throwable throwable, @NonNull() Severity severity)
Remotely logs a Throwable/Exception at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
throwable- the throwable to remotely logseverity- the severity level of the log message
-
logException
void logException(@NonNull() Throwable throwable, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)
Remotely logs a Throwable/Exception at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
throwable- the throwable to remotely logseverity- the severity level of the log messageproperties- custom key-value pairs to include with the log message
-
logException
void logException(@NonNull() Throwable throwable, @NonNull() Severity severity, @Nullable() Map<String, Object> properties, @Nullable() String message)
Remotely logs a Throwable/Exception at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
throwable- the throwable to remotely logseverity- the severity level of the log messageproperties- custom key-value pairs to include with the log messagemessage- the message to remotely log instead of the throwable message
-
logCustomStacktrace
void logCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements)
Remotely logs a custom stacktrace at ERROR level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
stacktraceElements- the stacktrace to remotely log
-
logCustomStacktrace
void logCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity)
Remotely logs a custom stacktrace at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
stacktraceElements- the stacktrace to remotely logseverity- the severity level of the log message
-
logCustomStacktrace
void logCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity, @Nullable() Map<String, Object> properties)
Remotely logs a custom stacktrace at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
stacktraceElements- the stacktrace to remotely logseverity- the severity level of the log messageproperties- custom key-value pairs to include with the log message
-
logCustomStacktrace
void logCustomStacktrace(@NonNull() Array<StackTraceElement> stacktraceElements, @NonNull() Severity severity, @Nullable() Map<String, Object> properties, @Nullable() String message)
Remotely logs a custom stacktrace at given severity level. These log messages and stacktraceswill appear as part of the session timeline, and can be used to describe what was happeningat a particular time within the app.
- Parameters:
stacktraceElements- the stacktrace to remotely logseverity- the severity level of the log messageproperties- custom key-value pairs to include with the log messagemessage- the message to remotely log instead of the throwable message
-
logBugReport
void logBugReport(@NonNull() Embrace.BugReportCategory bugReportCategory, @NonNull() String bugReportMessage)
-
showBugReportForm
void showBugReportForm()
-
logInternalError
void logInternalError(@Nullable() String message, @Nullable() String details)
Logs an internal error to the Embrace SDK - this is not intended for public use.
-
logInternalError
void logInternalError(@NonNull() Throwable error)
Logs an internal error to the Embrace SDK - this is not intended for public use.
-
endSession
synchronized void endSession()
-
endSession
synchronized void endSession(boolean clearUserInfo)
-
getDeviceId
@NonNull() String getDeviceId()
Get the user identifier assigned to the device by Embrace
-
startView
boolean startView(@NonNull() String name)
Records that a view 'started'. You should call this when your app starts displaying anactivity, a fragment, a screen, or any custom UI element, and you want to capture abreadcrumb that this happens.
A matching call to endView must be made when the view is no longerdisplayed.
A maximum of 100 breadcrumbs will be recorded per session, with a maximum length of 256characters per view name.
- Parameters:
name- the name of the view to log
-
endView
boolean endView(@NonNull() String name)
Records that a view 'ended'. You should call this when your app stops displaying anactivity, a fragment, a screen, or any custom UI element, and you want to capture abreadcrumb that this happens.
A matching call to startView must be made when the view is firstdisplayed, or no breadcrumb will be logged.
A maximum of 100 breadcrumbs will be recorded per session, with a maximum length of 256characters per view name.
- Parameters:
name- the name of the view to log
-
logRnView
void logRnView(@NonNull() String screen)
Logs the fact that a particular view was entered.
If the previously logged view has the same name, a duplicate view breadcrumb will not belogged.
- Parameters:
screen- the name of the view to log
-
getConfigService
@Nullable() ConfigService getConfigService()
-
isTracingAvailable
boolean isTracingAvailable()
-
createSpan
@Nullable() EmbraceSpan createSpan(@NonNull() String name)
-
createSpan
@Nullable() EmbraceSpan createSpan(@NonNull() String name, @Nullable() EmbraceSpan parent)
-
recordSpan
<T> T recordSpan(@NonNull() String name, @NonNull() Function0<out T> code)
-
recordSpan
<T> T recordSpan(@NonNull() String name, @Nullable() EmbraceSpan parent, @NonNull() Function0<out T> code)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode, @Nullable() EmbraceSpan parent, @Nullable() Map<String, String> attributes, @Nullable() List<EmbraceSpanEvent> events)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() EmbraceSpan parent)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() ErrorCode errorCode, @Nullable() EmbraceSpan parent)
-
recordCompletedSpan
boolean recordCompletedSpan(@NonNull() String name, long startTimeNanos, long endTimeNanos, @Nullable() Map<String, String> attributes, @Nullable() List<EmbraceSpanEvent> events)
-
getReactNativeInternalInterface
@Nullable() ReactNativeInternalInterface getReactNativeInternalInterface()
Gets the ReactNativeInternalInterface that should be used as the sole source ofcommunication with the Android SDK for React Native.
-
getUnityInternalInterface
@Nullable() UnityInternalInterface getUnityInternalInterface()
Gets the UnityInternalInterface that should be used as the sole source ofcommunication with the Android SDK for Unity.
-
getFlutterInternalInterface
@Nullable() FlutterInternalInterface getFlutterInternalInterface()
Gets the FlutterInternalInterface that should be used as the sole source ofcommunication with the Android SDK for Flutter.
-
logHandledDartException
void logHandledDartException(@Nullable() String stack, @Nullable() String name, @Nullable() String message, @Nullable() String context, @Nullable() String library)
Logs a handled Dart error to the Embrace SDK - this is not intended for public use.
-
logUnhandledDartException
void logUnhandledDartException(@Nullable() String stack, @Nullable() String name, @Nullable() String message, @Nullable() String context, @Nullable() String library)
Logs an unhandled Dart error to the Embrace SDK - this is not intended for public use.
-
sampleCurrentThreadDuringAnrs
void sampleCurrentThreadDuringAnrs()
-
logComposeTap
void logComposeTap(@NonNull() Pair<Float, Float> point, @NonNull() String elementName)
Logs taps from Compose views
- Parameters:
point- Position of the captured clickedelementName- Name of the clicked element
-
logPushNotification
void logPushNotification(@Nullable() String title, @Nullable() String body, @Nullable() String topic, @Nullable() String id, @Nullable() Integer notificationPriority, @NonNull() Integer messageDeliveredPriority, @NonNull() Boolean isNotification, @NonNull() Boolean hasData)
Saves captured push notification information into session payload
- Parameters:
title- the title of the notification as a string (or null)body- the body of the notification as a string (or null)topic- the notification topic (if a user subscribed to one), or nullid- A unique ID identifying the messagenotificationPriority- the notificationPriority of the message (as resolved on the device)messageDeliveredPriority- the priority of the message (as resolved on the server)isNotification- if it is a notification message.hasData- if the message contains payload data.
-
shouldCaptureNetworkBody
boolean shouldCaptureNetworkBody(@NonNull() String url, @NonNull() String method)
Determine if a network call should be captured based on the network capture rules
- Parameters:
url- the url of the network callmethod- the method of the network call
-
setProcessStartedByNotification
void setProcessStartedByNotification()
-
trackWebViewPerformance
void trackWebViewPerformance(@NonNull() String tag, @NonNull() ConsoleMessage consoleMessage)
Listen to performance-tracking JavaScript previously embedded in the website's code.The WebView being tracked must have JavaScript enabled.
- Parameters:
tag- a name used to identify the WebView being trackedconsoleMessage- the console message collected from the WebView
-
trackWebViewPerformance
void trackWebViewPerformance(@NonNull() String tag, @NonNull() String message)
Listen to performance-tracking JavaScript previously embedded in the website's code.The WebView being tracked must have JavaScript enabled.
- Parameters:
tag- a name used to identify the WebView being trackedmessage- the console message collected from the WebView
-
getCurrentSessionId
@Nullable() String getCurrentSessionId()
Get the ID for the current session.Returns null if a session has not been started yet or the SDK hasn't been initialized.
-
getLastRunEndState
@NonNull() Embrace.LastRunEndState getLastRunEndState()
Get the end state of the last run of the application.
-
-
-
-