MCPcopy
hub / github.com/prometheus/client_golang / NewBuildInfoCollector

Function NewBuildInfoCollector

prometheus/collectors/collectors.go:37–40  ·  view source on GitHub ↗

NewBuildInfoCollector returns a collector collecting a single metric "go_build_info" with the constant value 1 and three labels "path", "version", and "checksum". Their label values contain the main module path, version, and checksum, respectively. The labels will only have meaningful values if the

()

Source from the content-addressed store, hash-verified

35// https://github.com/povilasv/prommod for an example of a collector for the
36// module dependencies.
37func NewBuildInfoCollector() prometheus.Collector {
38 //nolint:staticcheck // Ignore SA1019 until v2.
39 return prometheus.NewBuildInfoCollector()
40}

Callers 1

mainFunction · 0.92

Calls 1

NewBuildInfoCollectorFunction · 0.92

Tested by

no test coverage detected