Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogrusCollector ¶
type LogrusCollector struct {
// contains filtered or unexported fields
}
LogrusCollector is a logrus hook to collect log counters.
func NewLogrusCollector ¶
func NewLogrusCollector() *LogrusCollector
NewLogrusCollector register internal metrics and return an logrus hook to collect log counters This function can be called only once, if more than one call is made an error will be returned.
func (*LogrusCollector) Fire ¶
func (hook *LogrusCollector) Fire(entry *logrus.Entry) error
Fire is called on every log call.
func (*LogrusCollector) Levels ¶
func (hook *LogrusCollector) Levels() []logrus.Level
Levels return a slice of levels supported by this hook;
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides Prometheus metrics via the /metrics route. This route will show all the metrics registered with the Prometheus DefaultRegisterer.
func NewPrometheusService ¶
NewPrometheusService sets up a new instance for a given address host:port. An empty host will match with any IP so an address like ":2121" is perfectly acceptable.