errstat

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeRange

func TimeRange(ctx *gin.Context)

func Top added in v1.0.29

func Top(ctx *gin.Context)

Types

type ErrSigMeta added in v1.0.29

type ErrSigMeta struct {
	SigHash     string `json:"sigHash"`               // Hash of signature for grouping/index
	Signature   string `json:"signature"`             // Normalized exception signature
	Level       string `json:"level"`                 // Log level bound to this signature
	SampleMsg   string `json:"sampleMsg,omitempty"`   // Sample msg
	SampleError string `json:"sampleError,omitempty"` // Sample error
	SampleTrace string `json:"sampleTrace,omitempty"` // Sample trace ID
	FirstAt     int64  `json:"firstAt"`               // First seen time (unix seconds)
	LastAt      int64  `json:"lastAt"`                // Last seen time (unix seconds)
}

type ErrSigRank added in v1.0.29

type ErrSigRank struct {
	SigHash     string `json:"sigHash"`
	Signature   string `json:"signature"`
	Level       string `json:"level"`
	Count       int64  `json:"count"`
	SampleMsg   string `json:"sampleMsg,omitempty"`
	SampleError string `json:"sampleError,omitempty"`
	SampleTrace string `json:"sampleTrace,omitempty"`
	FirstAt     int64  `json:"firstAt"`
	LastAt      int64  `json:"lastAt"`
}

type ErrSigStat added in v1.0.29

type ErrSigStat struct {
	At      int64  `json:"at"`      // Timestamp in seconds (minute bucket)
	Level   string `json:"level"`   // Log level
	SigHash string `json:"sigHash"` // Hash of signature for grouping/index
	Count   int64  `json:"count"`   // Occurrences in the bucket
}

type ErrStat

type ErrStat struct {
	At    int64 `json:"at"`    // Timestamp of the error
	Warn  int64 `json:"warn"`  // Warning count
	Error int64 `json:"error"` // Error count
	Panic int64 `json:"panic"` // Panic count
	Total int64 `json:"total"` // Total count of errors
}

type ErrType

type ErrType string
const (
	ErrTypeWarn  ErrType = "warn"  // Warning error type
	ErrTypeError ErrType = "error" // Error type
	ErrTypePanic ErrType = "panic" // Panic error type
	ErrTypeTotal ErrType = "total" // Total error type
)

func (ErrType) String

func (r ErrType) String() string

type Serv

type Serv struct {
	// contains filtered or unexported fields
}

func S

func S() *Serv

func (*Serv) Clear

func (s *Serv) Clear(ctx context.Context) error

func (*Serv) Collect

func (s *Serv) Collect(ctx context.Context)

Collect collects error statistics

func (*Serv) TimeRange

func (s *Serv) TimeRange(ctx context.Context, start, end int64, granularity cache.Granularity, field ...ErrType) ([]*cache.PageTimeItem, *errors.Error)

func (*Serv) TopSignatures added in v1.0.29

func (s *Serv) TopSignatures(ctx context.Context, start, end int64, filter []ErrType, limit int64) ([]*ErrSigRank, *errors.Error)

Jump to

Keyboard shortcuts

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