Documentation ¶
Overview ¶
Package statz used to wrap OpenCensus metric collection
Index ¶
Constants ¶
This section is empty.
Variables ¶
var LatencyDistribution = DistributionFromBounds(0, 5, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000, 6000)
LatencyDistribution is a basic latency distribution.
Functions ¶
This section is empty.
Types ¶
type Counter0 ¶
type Counter0 struct {
// contains filtered or unexported fields
}
Counter0 is a incremental int64 counter type with no metric labels.
func NewCounter0 ¶
func NewCounter0(name string, cfg MetricConfig) Counter0
NewCounter0 creates a new counter metric with 0 labels.
type Counter1 ¶
type Counter1[T1 labelContraint] struct {
// contains filtered or unexported fields
}
Counter1 is a incremental int64 counter type with 1 metric label.
func NewCounter1 ¶
func NewCounter1[T1 labelContraint](name string, cfg MetricConfig) Counter1[T1]
NewCounter1 creates a new counter metric with 1 labels.
type Counter2 ¶
type Counter2[T1 labelContraint, T2 labelContraint] struct {
// contains filtered or unexported fields
}
Counter2 is a incremental int64 counter type with 2 metric label.
func NewCounter2 ¶
func NewCounter2[T1, T2 labelContraint](name string, cfg MetricConfig) Counter2[T1, T2]
NewCounter2 creates a new counter metric with 2 labels.
type Counter3 ¶
type Counter3[T1 labelContraint, T2 labelContraint, T3 labelContraint] struct {
// contains filtered or unexported fields
}
Counter3 is a incremental int64 counter type with 3 metric label.
func NewCounter3 ¶
func NewCounter3[T1, T2, T3 labelContraint](name string, cfg MetricConfig) Counter3[T1, T2, T3]
NewCounter3 creates a new counter metric with 3 labels.
type Counter4 ¶
type Counter4[T1 labelContraint, T2 labelContraint, T3 labelContraint, T4 labelContraint] struct {
// contains filtered or unexported fields
}
Counter4 is a incremental int64 counter type with 4 metric label.
func NewCounter4 ¶
func NewCounter4[T1, T2 labelContraint, T3, T4 labelContraint](name string, cfg MetricConfig, ) Counter4[T1, T2, T3, T4]
NewCounter4 creates a new counter metric with 4 labels.
type Distribution ¶
type Distribution struct {
// contains filtered or unexported fields
}
Distribution contains hisogram buckets for metric of distribution type.
func DistributionFromBounds ¶
func DistributionFromBounds(bounds ...float64) Distribution
DistributionFromBounds create distribution from a list of bounds. Must be incrementing and non-overlapping.
type Distribution0 ¶
type Distribution0 struct {
// contains filtered or unexported fields
}
Distribution0 is a float64 histogram metic. Good for latencies.
func NewDistribution0 ¶
func NewDistribution0(name string, cfg MetricConfig, distribution Distribution) Distribution0
NewDistribution0 creates a new distribution metric with 0 labels.
func (*Distribution0) Observe ¶
func (c *Distribution0) Observe(v float64)
Observe records an observation of the metric.
type Distribution1 ¶
type Distribution1[T1 labelContraint] struct {
// contains filtered or unexported fields
}
Distribution1 is a float64 histogram metic. Good for latencies.
func NewDistribution1 ¶
func NewDistribution1[T1 labelContraint](name string, cfg MetricConfig, distribution Distribution) Distribution1[T1]
NewDistribution1 creates a new distribution metric with 1 labels.
func (*Distribution1[T1]) Observe ¶
func (c *Distribution1[T1]) Observe(v float64, l1 T1)
Observe records an observation of the metric.
type Distribution2 ¶
type Distribution2[T1 labelContraint, T2 labelContraint] struct {
// contains filtered or unexported fields
}
Distribution2 is a float64 histogram metic. Good for latencies.
func NewDistribution2 ¶
func NewDistribution2[T1, T2 labelContraint](name string, cfg MetricConfig, distribution Distribution, ) Distribution2[T1, T2]
NewDistribution2 creates a new distribution metric with 2 labels.
func (*Distribution2[T1, T2]) Observe ¶
func (c *Distribution2[T1, T2]) Observe(v float64, l1 T1, l2 T2)
Observe records an observation of the metric.
type Distribution3 ¶
type Distribution3[T1 labelContraint, T2 labelContraint, T3 labelContraint] struct {
// contains filtered or unexported fields
}
Distribution3 is a float64 histogram metic. Good for latencies.
func NewDistribution3 ¶
func NewDistribution3[T1, T2, T3 labelContraint](name string, cfg MetricConfig, distribution Distribution, ) Distribution3[T1, T2, T3]
NewDistribution3 creates a new distribution metric with 3 labels.
func (*Distribution3[T1, T2, T3]) Observe ¶
func (c *Distribution3[T1, T2, T3]) Observe(v float64, l1 T1, l2 T2, l3 T3)
Observe records an observation of the metric.
type Distribution4 ¶
type Distribution4[T1 labelContraint, T2 labelContraint, T3 labelContraint, T4 labelContraint] struct {
// contains filtered or unexported fields
}
Distribution4 is a float64 histogram metic. Good for latencies.
func NewDistribution4 ¶
func NewDistribution4[T1, T2, T3, T4 labelContraint](name string, cfg MetricConfig, distribution Distribution, ) Distribution4[T1, T2, T3, T4]
NewDistribution4 creates a new distribution metric with 4 labels.
func (*Distribution4[T1, T2, T3, T4]) Observe ¶
func (c *Distribution4[T1, T2, T3, T4]) Observe(v float64, l1 T1, l2 T2, l3 T3, l4 T4)
Observe records an observation of the metric.
Directories ¶
Path | Synopsis |
---|---|
Package main is an example of application stats collection
|
Package main is an example of application stats collection |
Package internal holds the global state for Statz
|
Package internal holds the global state for Statz |
Package units contains unit definitions for statz
|
Package units contains unit definitions for statz |