mirror of
https://github.com/hanzoai/dns.git
synced 2026-10-30 18:40:55 +00:00
Mechanical migration following the beego v2.3.8 fork precedent (bc7b075). Same exposition surface, zero prometheus/client_golang in the dep graph.
32 lines
1006 B
Go
32 lines
1006 B
Go
package grpc
|
|
|
|
import (
|
|
"github.com/coredns/coredns/plugin"
|
|
|
|
metric "github.com/luxfi/metric"
|
|
)
|
|
|
|
// Variables declared for monitoring.
|
|
var (
|
|
RequestCount = metric.NewCounterVec(metric.CounterOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "grpc",
|
|
Name: "requests_total",
|
|
Help: "Counter of requests made per upstream.",
|
|
}, []string{"to"})
|
|
RcodeCount = metric.NewCounterVec(metric.CounterOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "grpc",
|
|
Name: "responses_total",
|
|
Help: "Counter of requests made per upstream.",
|
|
}, []string{"rcode", "to"})
|
|
RequestDuration = metric.NewHistogramVec(metric.HistogramOpts{
|
|
Namespace: plugin.Namespace,
|
|
Subsystem: "grpc",
|
|
Name: "request_duration_seconds",
|
|
Buckets: plugin.TimeBuckets,
|
|
NativeHistogramBucketFactor: plugin.NativeHistogramBucketFactor,
|
|
Help: "Histogram of the time each request took.",
|
|
}, []string{"to"})
|
|
)
|