status

package
v0.27.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetStatsFunc

type GetStatsFunc func(r *http.Request, statsByLabelName string) (*tsdb.Stats, error)

type Options

type Options struct {
	GetStats GetStatsFunc
	Registry *prometheus.Registry
}

type Stat

type Stat struct {
	Name  string `json:"name"`
	Value uint64 `json:"value"`
}

Stat holds the information about individual cardinality.

type StatusAPI

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

TODO(fpetkovski): replace with upstream struct after dependency update.

func New

func New(opts Options) *StatusAPI

func (*StatusAPI) Register

func (sapi *StatusAPI) Register(r *route.Router, tracer opentracing.Tracer, logger log.Logger, ins extpromhttp.InstrumentationMiddleware, logMiddleware *logging.HTTPServerMiddleware)

type TSDBStatus

type TSDBStatus struct {
	HeadStats                   v1.HeadStats `json:"headStats"`
	SeriesCountByMetricName     []Stat       `json:"seriesCountByMetricName"`
	LabelValueCountByLabelName  []Stat       `json:"labelValueCountByLabelName"`
	MemoryInBytesByLabelName    []Stat       `json:"memoryInBytesByLabelName"`
	SeriesCountByLabelValuePair []Stat       `json:"seriesCountByLabelValuePair"`
}

TSDBStatus has information of cardinality statistics from postings.

Jump to

Keyboard shortcuts

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