stat

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	ReadErrorKey      = "readError"
	UnmarshalErrorKey = "unmarshalError"
)
View Source
const (
	Evaluate   = "eval"
	Invalid    = "invalid"
	Overloaded = "overloaded"
)
View Source
const Pending = "pending"

Variables

This section is empty.

Functions

func NewEval added in v0.9.0

func NewEval() counter.Provider

func NewHandler added in v0.20.0

func NewHandler() counter.Provider

NewHandler returns the counter.Provider used by Handler.ServeHTTP's per-request httpContextMetrics.

func NewHttp added in v0.13.0

func NewHttp() counter.Provider

func NewProvider added in v0.7.0

func NewProvider() counter.Provider

Types

type ReadError added in v0.13.0

type ReadError struct{ Error error }

func (ReadError) Aggregate added in v0.13.0

func (r ReadError) Aggregate(interface{})

implements github.com/viant/gmetric/counter.CustomCounter

func (ReadError) String added in v0.13.0

func (r ReadError) String() string

implements fmt.Stringer

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL