APMNetworkRequestInfo class

Network request information class, used to record information about network requests

Constructors

APMNetworkRequestInfo({required DateTime startTime, required Uri url, required String method, required String key})

Properties

contentLength int?
Response size
getter/setter pair
duration Duration
Calculate request duration (milliseconds)
no setter
endTime DateTime?
Request duration (milliseconds)
getter/setter pair
errorMessage String?
Error message (if any)
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isSuccess bool?
Whether the request was successful
getter/setter pair
key String
Unique key to identify the request
final
method String
Request method
final
responseUrl Uri?
Normalized URL
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackInfo String?
Temporary stored stack information
getter/setter pair
startTime DateTime
Request start time
final
statusCode int?
Response status code
getter/setter pair
traceId String?
Link ID in network monitoring
getter/setter pair
url Uri
Request URL
final

Methods

needReport() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
Convert request information to map format for reporting
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createRequestInfo({required Uri url, required String method}) String
Create and save a new request information
createTraceidFrom(String uuid) String
getRequestInfo(String key) APMNetworkRequestInfo?
Get request information by key
noHyphenUuid() → dynamic
removeRequestInfo(String key) → void
Remove completed request information
updateRequestInfo(String key, {int? statusCode, int? contentLength, bool? isSuccess, String? errorMessage}) → void
Update request information (called when request completes)