Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBuckets = []float64{
0.005,
0.01,
0.025,
0.05,
0.1,
0.25,
0.5,
1,
2.5,
5,
10,
}
DefaultBuckets defines standard histogram buckets in seconds.
Functions ¶
func NormalizeGRPCMethod ¶
Types ¶
type GRPCServerMetrics ¶
type GRPCServerMetrics struct {
// contains filtered or unexported fields
}
func NewGRPCServerMetrics ¶
func NewGRPCServerMetrics(reg *Registry) *GRPCServerMetrics
func (*GRPCServerMetrics) StreamServerInterceptor ¶
func (m *GRPCServerMetrics) StreamServerInterceptor() grpc.StreamServerInterceptor
func (*GRPCServerMetrics) UnaryServerInterceptor ¶
func (m *GRPCServerMetrics) UnaryServerInterceptor() grpc.UnaryServerInterceptor
type MongoMetrics ¶
type MongoMetrics struct {
// contains filtered or unexported fields
}
func NewMongoMetrics ¶
func NewMongoMetrics(reg *Registry) *MongoMetrics
func (*MongoMetrics) Monitor ¶
func (m *MongoMetrics) Monitor() *event.CommandMonitor
type OperationMetrics ¶
type OperationMetrics struct {
// contains filtered or unexported fields
}
func NewOperationMetrics ¶
func NewOperationMetrics(reg *Registry) *OperationMetrics
func (*OperationMetrics) ObserveMongo ¶
func (m *OperationMetrics) ObserveMongo(operation, collection, result string, duration time.Duration)
type ReadinessGauge ¶
type ReadinessGauge struct {
// contains filtered or unexported fields
}
func NewReadinessGauge ¶
func NewReadinessGauge(reg *Registry) *ReadinessGauge
func (*ReadinessGauge) Set ¶
func (r *ReadinessGauge) Set(component string, ready bool)
type Registry ¶
type Registry struct {
Registry *prometheus.Registry
Registerer prometheus.Registerer
Labels prometheus.Labels
Service string
Env string
Version string
}
Click to show internal directories.
Click to hide internal directories.