AdvancedNetworkRumMonitor - DataDog/dd-sdk-android GitHub Wiki
interface AdvancedNetworkRumMonitor
FOR INTERNAL USAGE ONLY.
Functions
addResourceTiming
abstract fun addResourceTiming(key: Any, timing: ResourceTiming)
notifyInterceptorInstantiated
abstract fun notifyInterceptorInstantiated()
startResource
abstract fun startResource(key: ResourceId, method: RumResourceMethod, url: String, attributes: Map<String, Any?> = emptyMap())
Notify that a new Resource is being loaded, linked with the key instance.
Parameters
key | the instance that represents the resource being loaded (usually your request or network call instance). |
method | the method used to load the resource (E.g., for network: "GET" or "POST") |
url | the url or local path of the resource being loaded |
attributes | additional custom attributes to attach to the resource. Attributes can be nested up to 9 levels deep. Keys using more than 9 levels will be sanitized by SDK. |
See also
AdvancedNetworkRumMonitor.stopResource |
AdvancedNetworkRumMonitor.stopResourceWithError |
stopResource
abstract fun stopResource(key: ResourceId, statusCode: Int?, size: Long?, kind: RumResourceKind, attributes: Map<String, Any?>)
Stops a previously started Resource, linked with the key instance.
Parameters
key | the instance that represents the active view (usually your request or network call instance). |
statusCode | the status code of the resource (if any) |
size | the size of the resource, in bytes |
kind | the type of resource loaded |
attributes | additional custom attributes to attach to the resource. Attributes can be nested up to 9 levels deep. Keys using more than 9 levels will be sanitized by SDK. |
See also
AdvancedNetworkRumMonitor.startResource |
AdvancedNetworkRumMonitor.stopResourceWithError |
stopResourceWithError
abstract fun stopResourceWithError(key: ResourceId, statusCode: Int?, message: String, source: RumErrorSource, throwable: Throwable, attributes: Map<String, Any?> = emptyMap())
Stops a previously started Resource that failed loading, linked with the key instance.
Parameters
key | the instance that represents the active view (usually your request or network call instance). |
statusCode | the status code of the resource (if any) |
message | a message explaining the error |
source | the source of the error |
throwable | the throwable |
attributes | additional custom attributes to attach to the error. Attributes can be nested up to 9 levels deep. Keys using more than 9 levels will be sanitized by SDK. Users that want to supply a custom fingerprint for this error can add a value under the key RumAttributes.ERROR_FINGERPRINT |
See also
AdvancedNetworkRumMonitor.startResource |
AdvancedNetworkRumMonitor.stopResource |
abstract fun stopResourceWithError(key: ResourceId, statusCode: Int?, message: String, source: RumErrorSource, stackTrace: String, errorType: String?, attributes: Map<String, Any?> = emptyMap())
Stops a previously started Resource that failed loading, linked with the key instance by providing the intercepted stacktrace. Note: This method should only be used from hybrid application.
Parameters
key | the instance that represents the active view (usually your request or network call instance). |
statusCode | the status code of the resource (if any) |
message | a message explaining the error |
source | the source of the error |
stackTrace | the error stacktrace |
errorType | the type of the error. Usually it should be the canonical name of the of the Exception class. |
attributes | additional custom attributes to attach to the error. Attributes can be nested up to 9 levels deep. Keys using more than 9 levels will be sanitized by SDK. Users that want to supply a custom fingerprint for this error can add a value under the key RumAttributes.ERROR_FINGERPRINT |
See also
AdvancedNetworkRumMonitor.startResource |
AdvancedNetworkRumMonitor.stopResource |
waitForResourceTiming
abstract fun waitForResourceTiming(key: Any)