Documentation
¶
Index ¶
Constants ¶
const ( // ResponseMarshalErrorKey counts requests where the prediction succeeded // but gojay.Marshal of the Response struct failed. The HTTP response was // NOT committed: ServeHTTP recovers by emitting an explicit 500. ResponseMarshalErrorKey = "responseMarshalError" // ResponseCommittedErrorKey counts requests where status + headers were // already flushed to the client (200 OK) when the body Write failed. // This is the server-side counterpart to the bidder-observed // "200 OK + empty/truncated body → invalid_json" failure mode. // A non-zero rate here indicates either: // - clients are closing the connection mid-response (most common // under load when client deadline < server response time), or // - HTTP/1.1 keepalive desync producing broken pipes on reuse. // Distinct from ErrorKey so it can be alerted independently. ResponseCommittedErrorKey = "responseCommittedError" )
const ( ReadErrorKey = "readError" UnmarshalErrorKey = "unmarshalError" )
const ( Evaluate = "eval" Invalid = "invalid" Overloaded = "overloaded" )
const Pending = "pending"
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶ added in v0.20.0
NewHandler returns the counter.Provider used by Handler.ServeHTTP's per-request httpContextMetrics.
func NewProvider ¶ added in v0.7.0
Types ¶
type ReadError ¶ added in v0.13.0
type ReadError struct{ Error error }
type ResponseCommittedError ¶ added in v0.20.0
type ResponseCommittedError struct{ Error error }
ResponseCommittedError is the analogous stat marker for post-commit write failures. See ResponseCommittedErrorKey for the operational significance.
func (ResponseCommittedError) Aggregate ¶ added in v0.20.0
func (r ResponseCommittedError) Aggregate(interface{})
func (ResponseCommittedError) String ¶ added in v0.20.0
func (r ResponseCommittedError) String() string
type ResponseMarshalError ¶ added in v0.20.0
type ResponseMarshalError struct{ Error error }
ResponseMarshalError is a stat marker for the gmetric provider. The embedded error is retained for top-K error sampling; the struct itself is intentionally NOT an `error` so the type-switch in Map can route it to its own bucket without colliding with the generic error case.
func (ResponseMarshalError) Aggregate ¶ added in v0.20.0
func (r ResponseMarshalError) Aggregate(interface{})
Aggregate implements github.com/viant/gmetric/counter.CustomCounter.
func (ResponseMarshalError) String ¶ added in v0.20.0
func (r ResponseMarshalError) String() string
String implements fmt.Stringer (used by gmetric top-K error sampling).
type UnmarshalError ¶ added in v0.13.0
type UnmarshalError struct{ Error error }
func (UnmarshalError) Aggregate ¶ added in v0.13.0
func (r UnmarshalError) Aggregate(interface{})
implements github.com/viant/gmetric/counter.CustomCounter
func (UnmarshalError) String ¶ added in v0.13.0
func (r UnmarshalError) String() string
implements fmt.Stringer