EmbraceNetworkRequest class

This class is used to create manually-recorded network requests.

Properties

bytesReceived → int
Bytes received as part of the network request.
final
bytesSent → int
Bytes sent as part of the network request.
final
endTime → int
Network request end time in ms.
final
errorDetails → String?
Error string if the request did not complete
final
hashCode → int
The hash code for this object.
no setterinherited
httpMethod → HttpMethod
Network request HTTP method.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime → int
Network request start time in ms.
final
statusCode → int
HTTP status code
final
traceId → String?
Optional trace ID for distributed tracing
final
url → String
Network request URL.
final
w3cTraceparent → String?
Optional w3c trace parent for network span forwarding
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromCompletedRequest({required String url, required HttpMethod httpMethod, required int startTime, required int endTime, required int bytesSent, required int bytesReceived, required int statusCode, String? traceId, String? w3cTraceparent}) → EmbraceNetworkRequest
Construct a new EmbraceNetworkRequest instance where a HTTP response was returned. If no response was returned, use fromIncompleteRequest instead.
fromIncompleteRequest({required String url, required HttpMethod httpMethod, required int startTime, required int endTime, required String errorDetails, String? traceId, String? w3cTraceparent}) → EmbraceNetworkRequest
Construct a new EmbraceNetworkRequest instance where a HTTP response was not returned. If a response was returned, use fromCompletedRequest instead.