promlint
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package promlint provides a linter for Prometheus metrics.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeLinter¶
type Linter struct {// contains filtered or unexported fields}A Linter is a Prometheus metrics linter. It identifies issues with metricnames, types, and metadata, and reports them to the caller.
funcNew¶
New creates a new Linter that reads an input stream of Prometheus metrics inthe Prometheus text exposition format.
funcNewWithMetricFamilies¶
func NewWithMetricFamilies(mfs []*dto.MetricFamily) *Linter
NewWithMetricFamilies creates a new Linter that reads from a slice ofMetricFamily protobuf messages.
func (*Linter)AddCustomValidations¶added inv1.18.0
func (l *Linter) AddCustomValidations(vs ...Validation)
AddCustomValidations adds custom validations to the linter.
typeProblem¶
type Problem struct {// The name of the metric indicated by this Problem.Metricstring// A description of the issue for this Problem.Textstring}A Problem is an issue detected by a linter.
typeValidation¶added inv1.18.0
type Validation = func(mf *dto.MetricFamily) []error