RequestSummary class

What a completed request looked like, from the outside.

The shape a metrics counter, a latency histogram or a tracing span needs: enough to label the measurement, and nothing that pins the request's objects in memory after it has finished.

Constructors

RequestSummary({required String method, required String path, required String? routePath, required int statusCode, required Duration duration, required DateTime startedAt, String? error})
const

Properties

duration → Duration
final
error → String?
Set when the response carried an error body.
final
hashCode → int
The hash code for this object.
no setterinherited
method → String
final
path → String
The concrete path this request asked for, e.g. /api/users/42.
final
routePath → String?
The registered path of the route that matched, e.g. /api/users/:id, or null when nothing matched.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startedAt → DateTime
final
statusCode → int
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