type

RequestObservation

Transport timing and response metadata for one completed request.

Properties

PropertyTypeDescription
Timetime.TimeWhen the observation was recorded.
RequestIDstringCorrelates the observation with audit events and logs.
MethodstringThe HTTP request method.
PathstringThe requested URL path.
StatusintThe HTTP response status code.
ErrorCodestringThe stable public Ridu code for a failed request.
ErrorReasonstringErrorReason is the specific code behind ErrorCode, such as origin_denied behind access_denied or body_too_large behind bad_request. Responses carry only ErrorCode; use ErrorReason for monitoring and alerts.
ResponseBytesint64The response-body byte count.
Durationtime.DurationThe complete handler execution time.

Full signature

type RequestObservation struct { // Time is when the observation was recorded. Time time.Time // RequestID correlates the observation with audit events and logs. RequestID string // Method is the HTTP request method. Method string // Path is the requested URL path. Path string // Status is the HTTP response status code. Status int // ErrorCode is the stable public Ridu code for a failed request. ErrorCode string // ErrorReason is the specific code behind ErrorCode, such as origin_denied // behind access_denied or body_too_large behind bad_request. Responses // carry only ErrorCode; use ErrorReason for monitoring and alerts. ErrorReason string // ResponseBytes is the number of response-body bytes the handler wrote, // before compression. ResponseBytes int64 // Duration is the total handler execution time. Duration time.Duration }

Source core/http.go:129