switch to go-kit/log (#1575)
Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
parent
a80b7d0bc5
commit
2477c5c67d
158 changed files with 3434 additions and 4636 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
|
@ -54,7 +55,8 @@ const (
|
|||
)
|
||||
|
||||
type tcpStatCollector struct {
|
||||
desc typedDesc
|
||||
desc typedDesc
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -62,13 +64,14 @@ func init() {
|
|||
}
|
||||
|
||||
// NewTCPStatCollector returns a new Collector exposing network stats.
|
||||
func NewTCPStatCollector() (Collector, error) {
|
||||
func NewTCPStatCollector(logger log.Logger) (Collector, error) {
|
||||
return &tcpStatCollector{
|
||||
desc: typedDesc{prometheus.NewDesc(
|
||||
prometheus.BuildFQName(namespace, "tcp", "connection_states"),
|
||||
"Number of connection states.",
|
||||
[]string{"state"}, nil,
|
||||
), prometheus.GaugeValue},
|
||||
logger: logger,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue