Documentation ¶
Index ¶
- Variables
- func PublishErrorRateLimiterMetrics(key string, err error)
- func PublishRateLimiterMetrics(key string, start time.Time)
- func PublishStrategyMetrics(key string, usedDelay, lockLatency time.Duration)
- func PublishStrategyRateLimiterLatencyMetrics(key string, start time.Time)
- func RegisterMetrics()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RateLimitLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Subsystem: negControllerSubsystem, Name: "rate_limit_delay_seconds", Help: "Latency of the RateLimiter Accept Operation", Buckets: prometheus.ExponentialBuckets(0.5, 2, 14), }, metricsLabels, ) StrategyLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Subsystem: negControllerSubsystem, Name: "strategy_delay_seconds", Help: "Latency of the strategyRateLimiter Accept Operation", Buckets: prometheus.ExponentialBuckets(0.5, 2, 14), }, metricsLabels, ) StrategyUsedDelay = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Subsystem: negControllerSubsystem, Name: "strategy_used_delay_seconds", Help: "Delay in seconds used by the throttling strategy", Buckets: prometheus.ExponentialBuckets(0.1, 2, 14), }, metricsLabels, ) StrategyLockLatency = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Subsystem: negControllerSubsystem, Name: "strategy_lock_delay_seconds", Help: "Latency of the lock acquisition for the StrategyRateLimiter", Buckets: append(prometheus.ExponentialBuckets(1e-9, 10, 8), prometheus.ExponentialBuckets(0.1, 12, 14)...), }, metricsLabels, ) ErrorsCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: negControllerSubsystem, Name: "errors_counter", Help: "Number of different errors in the rate limiter", }, append(metricsLabels, "error_type"), ) )
Functions ¶
func PublishErrorRateLimiterMetrics ¶ added in v1.24.0
func PublishStrategyMetrics ¶ added in v1.24.0
func PublishStrategyRateLimiterLatencyMetrics ¶ added in v1.24.0
func RegisterMetrics ¶
func RegisterMetrics()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.