metrics

package
v0.0.0-...-945f628 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMetricsCollectors

func NewMetricsCollectors(metricsConfig *config.Metrics)

func RecordPendingRequestCount

func RecordPendingRequestCount(host string, value int64)

func RecordRequestCount

func RecordRequestCount(method string, path string, responseCode int, host string)

Types

type Collector

type Collector interface {
	RecordRequestCount(method string, path string, responseCode int, host string)
	RecordPendingRequestCount(host string, value int64)
}

type OtelMetrics

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

func NewOtelMetrics

func NewOtelMetrics(metricsConfig *config.Metrics, options ...metric.Option) *OtelMetrics

func (*OtelMetrics) RecordPendingRequestCount

func (om *OtelMetrics) RecordPendingRequestCount(host string, value int64)

func (*OtelMetrics) RecordRequestCount

func (om *OtelMetrics) RecordRequestCount(method string, path string, responseCode int, host string)

type PrometheusMetrics

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

func NewPrometheusMetrics

func NewPrometheusMetrics(options ...prometheus.Option) *PrometheusMetrics

func (*PrometheusMetrics) RecordPendingRequestCount

func (p *PrometheusMetrics) RecordPendingRequestCount(host string, value int64)

func (*PrometheusMetrics) RecordRequestCount

func (p *PrometheusMetrics) RecordRequestCount(method string, path string, responseCode int, host string)

Jump to

Keyboard shortcuts

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