MCPcopy Create free account
hub / github.com/coder/coder / DERPExpvarCollector

Struct DERPExpvarCollector

tailnet/derpmetrics/metrics.go:13–46  ·  view source on GitHub ↗

DERPExpvarCollector exports a DERP server's expvar stats as properly typed Prometheus metrics.

Source from the content-addressed store, hash-verified

11// DERPExpvarCollector exports a DERP server's expvar stats as
12// properly typed Prometheus metrics.
13type DERPExpvarCollector struct {
14 server *derp.Server
15
16 // Counters.
17 accepts *prometheus.Desc
18 bytesReceived *prometheus.Desc
19 bytesSent *prometheus.Desc
20 packetsReceived *prometheus.Desc
21 packetsSent *prometheus.Desc
22 packetsDropped *prometheus.Desc
23 packetsForwardedIn *prometheus.Desc
24 packetsForwardedOut *prometheus.Desc
25 homeMovesIn *prometheus.Desc
26 homeMovesOut *prometheus.Desc
27 gotPing *prometheus.Desc
28 sentPong *prometheus.Desc
29 peerGoneDisconnected *prometheus.Desc
30 peerGoneNotHere *prometheus.Desc
31 unknownFrames *prometheus.Desc
32
33 // Labeled counters.
34 packetsDroppedByReason *prometheus.Desc
35 packetsDroppedByType *prometheus.Desc
36 packetsReceivedByKind *prometheus.Desc
37
38 // Gauges.
39 connections *prometheus.Desc
40 homeConnections *prometheus.Desc
41 clientsTotal *prometheus.Desc
42 clientsLocal *prometheus.Desc
43 clientsRemote *prometheus.Desc
44 watchers *prometheus.Desc
45 avgQueueDurMS *prometheus.Desc
46}
47
48// NewDERPExpvarCollector creates a Prometheus collector that reads
49// stats from a DERP server's expvar on each scrape.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected