Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 16-Feb-2017 | - | ||||
.gitignore | H A D | 16-Feb-2017 | 28 | 2 | 1 | |
README.md | H A D | 16-Feb-2017 | 1.3 KiB | 54 | 42 | |
benchmark_test.go | H A D | 16-Feb-2017 | 3.5 KiB | 160 | 135 | |
collector.go | H A D | 16-Feb-2017 | 3.5 KiB | 76 | 17 | |
counter.go | H A D | 16-Feb-2017 | 5.8 KiB | 176 | 92 | |
counter_test.go | H A D | 16-Feb-2017 | 1.7 KiB | 59 | 38 | |
desc.go | H A D | 16-Feb-2017 | 6.7 KiB | 201 | 126 | |
doc.go | H A D | 16-Feb-2017 | 4.6 KiB | 110 | 1 | |
example_clustermanager_test.go | H A D | 16-Feb-2017 | 4.9 KiB | 131 | 73 | |
example_memstats_test.go | H A D | 16-Feb-2017 | 2.8 KiB | 88 | 51 | |
example_selfcollector_test.go | H A D | 16-Feb-2017 | 2.1 KiB | 68 | 37 | |
examples_test.go | H A D | 16-Feb-2017 | 20.1 KiB | 648 | 298 | |
expvar.go | H A D | 16-Feb-2017 | 4.1 KiB | 120 | 62 | |
expvar_test.go | H A D | 16-Feb-2017 | 3.4 KiB | 97 | 65 | |
gauge.go | H A D | 16-Feb-2017 | 4.9 KiB | 148 | 73 | |
gauge_test.go | H A D | 16-Feb-2017 | 4.2 KiB | 183 | 145 | |
go_collector.go | H A D | 16-Feb-2017 | 7.6 KiB | 264 | 245 | |
go_collector_test.go | H A D | 16-Feb-2017 | 2.6 KiB | 124 | 105 | |
histogram.go | H A D | 16-Feb-2017 | 14.1 KiB | 450 | 264 | |
histogram_test.go | H A D | 16-Feb-2017 | 7.3 KiB | 327 | 254 | |
http.go | H A D | 16-Feb-2017 | 8.7 KiB | 362 | 268 | |
http_test.go | H A D | 16-Feb-2017 | 3.4 KiB | 122 | 90 | |
metric.go | H A D | 16-Feb-2017 | 6.1 KiB | 167 | 60 | |
metric_test.go | H A D | 16-Feb-2017 | 1.1 KiB | 36 | 19 | |
process_collector.go | H A D | 16-Feb-2017 | 4.1 KiB | 143 | 101 | |
process_collector_test.go | H A D | 16-Feb-2017 | 1.6 KiB | 55 | 48 | |
push.go | H A D | 16-Feb-2017 | 2.7 KiB | 66 | 22 | |
registry.go | H A D | 16-Feb-2017 | 23 KiB | 726 | 506 | |
registry_test.go | H A D | 16-Feb-2017 | 14.2 KiB | 536 | 493 | |
summary.go | H A D | 16-Feb-2017 | 16.1 KiB | 540 | 318 | |
summary_test.go | H A D | 16-Feb-2017 | 7.6 KiB | 348 | 275 | |
untyped.go | H A D | 16-Feb-2017 | 4.9 KiB | 146 | 73 | |
value.go | H A D | 16-Feb-2017 | 6.7 KiB | 234 | 159 | |
vec.go | H A D | 16-Feb-2017 | 8 KiB | 248 | 131 | |
vec_test.go | H A D | 16-Feb-2017 | 2.9 KiB | 92 | 68 |
README.md
1# Overview 2This is the [Prometheus](http://www.prometheus.io) telemetric 3instrumentation client [Go](http://golang.org) client library. It 4enable authors to define process-space metrics for their servers and 5expose them through a web service interface for extraction, 6aggregation, and a whole slew of other post processing techniques. 7 8# Installing 9 $ go get github.com/prometheus/client_golang/prometheus 10 11# Example 12```go 13package main 14 15import ( 16 "net/http" 17 18 "github.com/prometheus/client_golang/prometheus" 19) 20 21var ( 22 indexed = prometheus.NewCounter(prometheus.CounterOpts{ 23 Namespace: "my_company", 24 Subsystem: "indexer", 25 Name: "documents_indexed", 26 Help: "The number of documents indexed.", 27 }) 28 size = prometheus.NewGauge(prometheus.GaugeOpts{ 29 Namespace: "my_company", 30 Subsystem: "storage", 31 Name: "documents_total_size_bytes", 32 Help: "The total size of all documents in the storage.", 33 }) 34) 35 36func main() { 37 http.Handle("/metrics", prometheus.Handler()) 38 39 indexed.Inc() 40 size.Set(5) 41 42 http.ListenAndServe(":8080", nil) 43} 44 45func init() { 46 prometheus.MustRegister(indexed) 47 prometheus.MustRegister(size) 48} 49``` 50 51# Documentation 52 53[![GoDoc](https://godoc.org/github.com/prometheus/client_golang?status.png)](https://godoc.org/github.com/prometheus/client_golang) 54