package
0.0.0-20240514141728-2113ccc707c7
Repository: https://github.com/zeim839/go-metrics-plus.git
Documentation: pkg.go.dev
# README
Logging
Logging is a package for logging and encoding various go-metrics-plus metrics. The package may be used to log metrics to stdout through the use of an Encoder interface, which transforms metrics into plain text.
The package has built-in encoders for graphite plain text, prometheus expositional format, and Stasd line protocol.
# Functions
Encode encodes a metric into prometheus expositional format.
EncodeGraphite encodes a metric into graphite format.
EncodeStatsd encodes a metric into statsd line protocol.
Logger is a block exporter function which flushes metrics in r to stdout using the given Encoder, sinking them every d duration and prepending metric names with prefix.
Write sorts & writes each metric in the given registry periodically to the given io.Writer, in the prometheus expositional format.
WriteOnce sorts & writes metrics in the given registry to the given io.Writer, in the prometheus expositional format.
# Type aliases
An Encoder encodes an interface and writes into the writer w.