FlutterInternalInterface

public interface FlutterInternalInterface implements EmbraceInternalInterface

Provides an internal interface to Embrace that is intended for use by Flutter as its sole source of communication with the Android SDK.

Functions

Link copied to clipboard
public abstract Boolean addSpanAttribute(String spanId, String key, String value)

Add an attribute to an active span with the given spanId. Returns true if the attributed is added and false otherwise.

Link copied to clipboard
public abstract Boolean addSpanEvent(String spanId, String name, Long timestampMs, Map<String, String> attributes)

Create and add a Span Event with the given parameters to an active span with the given spanId. Returns false if the event cannot be added.

Link copied to clipboard
public abstract Long getSdkCurrentTime()

Return internal time the SDK is using in milliseconds. It is equivalent to System.currentTimeMillis assuming the system clock did not change after the SDK has started.

Link copied to clipboard
public abstract Boolean isAnrCaptureEnabled()

Whether the ANR capture service is enabled

Link copied to clipboard

Whether network capture has been disabled through an internal, not-publicly supported means

Link copied to clipboard
public abstract Boolean isNdkEnabled()

Whether the native crash capture is enabled

Link copied to clipboard

Whether the Network Span Forwarding feature is enabled

Link copied to clipboard
public abstract Unit logComposeTap(Pair<Float, Float> point, String elementName)

Logs a tap on a Compose screen element.

Link copied to clipboard
public abstract Unit logError(String message, Map<String, Object> properties, String stacktrace, Boolean isException)

See Embrace.logError

Link copied to clipboard
public abstract Unit logHandledDartException(String stack, String name, String message, String context, String library)

Logs a handled Dart error to the Embrace SDK - this is not intended for public use.

Link copied to clipboard
public abstract Unit logHandledException(Throwable throwable, LogType type, Map<String, Object> properties, Array<StackTraceElement> customStackTrace)

Backwards compatible way for hosted SDKs to log a handled exception with different log levels

Link copied to clipboard
public abstract Unit logInfo(String message, Map<String, Object> properties)

See Embrace.logInfo

Link copied to clipboard
public abstract Unit logInternalError(Throwable error)
public abstract Unit logInternalError(String message, String details)

Logs an internal error to the Embrace SDK - this is not intended for public use.

Link copied to clipboard
public abstract Unit logUnhandledDartException(String stack, String name, String message, String context, String library)

Logs an unhandled Dart error to the Embrace SDK - this is not intended for public use.

Link copied to clipboard
public abstract Unit logWarning(String message, Map<String, Object> properties, String stacktrace)

See Embrace.logWarning

Link copied to clipboard
public abstract Unit recordCompletedNetworkRequest(String url, String httpMethod, Long startTime, Long endTime, Long bytesSent, Long bytesReceived, Integer statusCode, String traceId, NetworkCaptureData networkCaptureData)

See Embrace.recordNetworkRequest

Link copied to clipboard
public abstract Boolean recordCompletedSpan(String name, Long startTimeMs, Long endTimeMs, ErrorCode errorCode, String parentSpanId, Map<String, String> attributes, List<Map<String, Object>> events)

Record a completed span with the given parameters. Returns true if the span is record and false otherwise.

Link copied to clipboard
public abstract Unit recordIncompleteNetworkRequest(String url, String httpMethod, Long startTime, Long endTime, Throwable error, String traceId, NetworkCaptureData networkCaptureData)
public abstract Unit recordIncompleteNetworkRequest(String url, String httpMethod, Long startTime, Long endTime, String errorType, String errorMessage, String traceId, NetworkCaptureData networkCaptureData)

See Embrace.recordNetworkRequest

Link copied to clipboard
public abstract Unit recordNetworkRequest(EmbraceNetworkRequest embraceNetworkRequest)

Record a network request.

Link copied to clipboard
public abstract T recordSpan<T extends Any>(String name, String parentSpanId, Map<String, String> attributes, List<Map<String, Object>> events, Function0<T> code)

Record a span around the execution of the given lambda. If an uncaught exception occurs during the execution, the span will be terminated as a failure.

Link copied to clipboard
public abstract Unit setDartVersion(String version)

Sets the Dart version - this is not intended for public use.

Link copied to clipboard
public abstract Unit setEmbraceFlutterSdkVersion(String version)

Sets the Embrace Flutter SDK version - this is not intended for public use.

Link copied to clipboard

Mark that this application process was created in response to a notification

Link copied to clipboard
public abstract Boolean shouldCaptureNetworkBody(String url, String method)

For the given URL and method, whether the response body should be captured for network request logging

Link copied to clipboard
public abstract String startSpan(String name, String parentSpanId, Long startTimeMs)

Create and start a new span. Returns the spanId of the new span if both operations are successful, and null if either fails.

Link copied to clipboard
public abstract Unit stopSdk()

Stop the Embrace SDK and disable its functionality

Link copied to clipboard
public abstract Boolean stopSpan(String spanId, ErrorCode errorCode, Long endTimeMs)

Stop an active span. Returns true if the span is stopped after the method returns and false otherwise.