type
RequestObservation
Transport timing and response metadata for one completed request.
Properties
| Property | Type | Description |
|---|---|---|
Time | time.Time | When the observation was recorded. |
RequestID | string | Correlates the observation with audit events and logs. |
Method | string | The HTTP request method. |
Path | string | The requested URL path. |
Status | int | The HTTP response status code. |
ErrorCode | string | The stable public Ridu code for a failed request. |
ErrorReason | 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. |
ResponseBytes | int64 | The response-body byte count. |
Duration | time.Duration | The 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
}