-
public final class RumNetworkInstrumentationFor internal usage only.
Handles RUM (Real User Monitoring) instrumentation for network resources. This class provides methods to track HTTP requests and responses as RUM resources.
This class operates as a middle layer between any specific library instrumentation and SDK core components, making it possible to share the same logic between different networking libraries (OkHttp, Cronet, etc.).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRumNetworkInstrumentation.Companion
-
Field Summary
Fields Modifier and Type Field Description private final SdkCoresdkCore
-
Method Summary
Modifier and Type Method Description final SdkCoregetSdkCore()final UnitsendWaitForResourceTimingEvent(HttpRequestInfo requestInfo)Sends an event to indicate that resource timing information is expected for this request. final UnitsendTiming(HttpRequestInfo requestInfo, ResourceTiming resourceTiming)Sends resource timing information for a request. final UnitstartResource(HttpRequestInfo requestInfo)Starts tracking a network resource. final UnitstopResource(HttpRequestInfo requestInfo, HttpResponseInfo responseInfo, Map<String, Object> attributes)Stops tracking a network resource with a successful response. final UnitstopResourceWithError(HttpRequestInfo requestInfo, Throwable throwable)Stops tracking a network resource with an error. final UnitreportInstrumentationError(Function0<String> message)Reports an instrumentation error to the internal logger. -
-
Method Detail
-
getSdkCore
final SdkCore getSdkCore()
-
sendWaitForResourceTimingEvent
final Unit sendWaitForResourceTimingEvent(HttpRequestInfo requestInfo)
Sends an event to indicate that resource timing information is expected for this request.
- Parameters:
requestInfo- the request information
-
sendTiming
final Unit sendTiming(HttpRequestInfo requestInfo, ResourceTiming resourceTiming)
Sends resource timing information for a request.
- Parameters:
requestInfo- the request informationresourceTiming- the timing information to report
-
startResource
final Unit startResource(HttpRequestInfo requestInfo)
Starts tracking a network resource.
- Parameters:
requestInfo- the request information
-
stopResource
@WorkerThread() final Unit stopResource(HttpRequestInfo requestInfo, HttpResponseInfo responseInfo, Map<String, Object> attributes)
Stops tracking a network resource with a successful response.
- Parameters:
requestInfo- the request informationresponseInfo- the response informationattributes- additional attributes to attach to the resource event
-
stopResourceWithError
final Unit stopResourceWithError(HttpRequestInfo requestInfo, Throwable throwable)
Stops tracking a network resource with an error.
- Parameters:
requestInfo- the request informationthrowable- the error that occurred
-
reportInstrumentationError
final Unit reportInstrumentationError(Function0<String> message)
Reports an instrumentation error to the internal logger.
- Parameters:
message- the error message to report
-
-
-
-