Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMetricServer ¶
func RunMetricServer(cfg MetricsServerConfig) error
Types ¶
type EmptyMetrics ¶
type EmptyMetrics struct{}
func (*EmptyMetrics) IncGrpcPanicsTotal ¶
func (m *EmptyMetrics) IncGrpcPanicsTotal()
func (*EmptyMetrics) IncHits ¶
func (m *EmptyMetrics) IncHits(_ int, _, _ string)
func (*EmptyMetrics) IncRestPanicsTotal ¶
func (m *EmptyMetrics) IncRestPanicsTotal()
func (*EmptyMetrics) ObserveResponseTime ¶
func (m *EmptyMetrics) ObserveResponseTime(_ int, _, _ string, _ float64)
type Metrics ¶
type Metrics interface { IncHits(status int, method, path string) ObserveResponseTime(status int, method, path string, observeTime float64) IncRestPanicsTotal() IncGrpcPanicsTotal() }
func CreateMetrics ¶
type MetricsServerConfig ¶
type PrometheusMetrics ¶
type PrometheusMetrics struct { HitsTotal prometheus.Counter Hits *prometheus.CounterVec Times *prometheus.HistogramVec RestPanicRecoverTotal prometheus.Counter GrpcPanicRecoverTotal prometheus.Counter }
func (*PrometheusMetrics) IncGrpcPanicsTotal ¶
func (metr *PrometheusMetrics) IncGrpcPanicsTotal()
func (*PrometheusMetrics) IncHits ¶
func (metr *PrometheusMetrics) IncHits(status int, method, path string)
func (*PrometheusMetrics) IncRestPanicsTotal ¶
func (metr *PrometheusMetrics) IncRestPanicsTotal()
func (*PrometheusMetrics) ObserveResponseTime ¶
func (metr *PrometheusMetrics) ObserveResponseTime(status int, method, path string, observeTime float64)
Click to show internal directories.
Click to hide internal directories.