-
public interface InstrumentationApiAPI to control and customize Embrace instrumentation
-
-
Method Summary
Modifier and Type Method Description abstract UnitapplicationInitEnd()Notify the Embrace SDK that the application has been fully created. abstract UnitappReady()Notify the Embrace SDK that app startup has completed and the UI is ready to be used. abstract UnitactivityLoaded(Activity activity)Notify the Embrace UI Load instrumentation that the given Activity instance has fully loaded, so its associated trace can be stopped abstract LonggetSdkCurrentTimeMs()Return the timestamp of the SDK clock. abstract UnitaddLoadTraceAttribute(Activity activity, String key, String value)Add an attribute to the trace generated by the loading of the given Activity UnitaddLoadTraceChildSpan(Activity activity, String name, Long startTimeMs, Long endTimeMs)Add a successfully completed child span to the trace generated by the loading of the given Activity abstract UnitaddLoadTraceChildSpan(Activity activity, String name, Long startTimeMs, Long endTimeMs, Map<String, String> attributes, List<EmbraceSpanEvent> events, ErrorCode errorCode)Add a completed child span to the trace generated by the loading of the given Activity with the given attributes and span events. abstract UnitaddStartupTraceAttribute(String key, String value)Add an attribute to the app startup trace UnitaddStartupTraceChildSpan(String name, Long startTimeMs, Long endTimeMs)Add a successfully completed child span to the app startup trace abstract UnitaddStartupTraceChildSpan(String name, Long startTimeMs, Long endTimeMs, Map<String, String> attributes, List<EmbraceSpanEvent> events, ErrorCode errorCode)Add a completed child span to the app startup trace with the given attributes and span events. -
-
Method Detail
-
applicationInitEnd
abstract Unit applicationInitEnd()
Notify the Embrace SDK that the application has been fully created. This is typically called at the end of the Application.onCreate() function. Calling this will allow the SDK to more accurately gather the details of the trace recorded for app startup.
-
appReady
abstract Unit appReady()
Notify the Embrace SDK that app startup has completed and the UI is ready to be used.
-
activityLoaded
abstract Unit activityLoaded(Activity activity)
Notify the Embrace UI Load instrumentation that the given Activity instance has fully loaded, so its associated trace can be stopped
-
getSdkCurrentTimeMs
abstract Long getSdkCurrentTimeMs()
Return the timestamp of the SDK clock. This value should be used when creating spans with specific start and end times so that
-
addLoadTraceAttribute
abstract Unit addLoadTraceAttribute(Activity activity, String key, String value)
Add an attribute to the trace generated by the loading of the given Activity
-
addLoadTraceChildSpan
Unit addLoadTraceChildSpan(Activity activity, String name, Long startTimeMs, Long endTimeMs)
Add a successfully completed child span to the trace generated by the loading of the given Activity
-
addLoadTraceChildSpan
abstract Unit addLoadTraceChildSpan(Activity activity, String name, Long startTimeMs, Long endTimeMs, Map<String, String> attributes, List<EmbraceSpanEvent> events, ErrorCode errorCode)
-
addStartupTraceAttribute
abstract Unit addStartupTraceAttribute(String key, String value)
Add an attribute to the app startup trace
-
addStartupTraceChildSpan
Unit addStartupTraceChildSpan(String name, Long startTimeMs, Long endTimeMs)
Add a successfully completed child span to the app startup trace
-
addStartupTraceChildSpan
abstract Unit addStartupTraceChildSpan(String name, Long startTimeMs, Long endTimeMs, Map<String, String> attributes, List<EmbraceSpanEvent> events, ErrorCode errorCode)
Add a completed child span to the app startup trace with the given attributes and span events. Specify an ErrorCode if the span didn't complete successfully.
-
-
-
-