Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager Manager
func NewMetricsManager ¶
NewMetricsManager InterceptorManager constructor
func (*Manager) Metrics ¶
func (im *Manager) Metrics(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Metrics :
type Metrics ¶
type Metrics interface { IncHits(status int, method, path string) ObserveResponseTime(status int, method, path string, observeTime float64) }
Metrics details of hits , response time
func CreateMetrics ¶
CreateMetrics : Create Metrics will create the metrics in prometheus server.
type PrometheusMetrics ¶
type PrometheusMetrics struct { HitsTotal prometheus.Counter Hits *prometheus.CounterVec Times *prometheus.HistogramVec }
func (*PrometheusMetrics) IncHits ¶
func (metrics *PrometheusMetrics) IncHits(status int, method, path string)
IncHits : increment the total hits
func (*PrometheusMetrics) ObserveResponseTime ¶
func (metrics *PrometheusMetrics) ObserveResponseTime(status int, method, path string, observeTime float64)
ObserveResponseTime :
Click to show internal directories.
Click to hide internal directories.