Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCollector ¶
func NewCollector(program string) *prometheus.GaugeVec
NewCollector returns a collector which exports metrics about current dependency information.
Example ¶
package main
import (
"log"
"net/http"
"github.com/povilasv/promver"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func main() {
prometheus.Register(promver.NewCollector("test_app_name"))
http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(":8080", nil))
}
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.