client_golang
client_golang copied to clipboard
Prometheus instrumentation library for Go applications
I've upgraded from Go 1.17.7 to 1.17.8 and I've noticed that exported metrics labels changed as a result. le label on some histogram uses now different values than it used...
Context: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9120. The OpenTelemetry has a prometheus exporter, which behaves similarly to a federated prometheus endpoint. It uses the `NewConstX` functions to expose metrics on the endpoint. OpenMetrics [requires](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/9120) the...
If I register as such: ```go var ( simpleCounter = promauto.NewCounter(prometheus.CounterOpts{ Name: "simple_counter", Help: "Some help message", }) simpleCounterVec = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "simple_counter_vec", Help: "Some help message", }, []string{"label1", "label2"})...
I want to iterator result from query, but it's a string, so, i need to handle it by myself? `result, warnings, err := cli.api.Query(context.TODO(), "kube_node_status_condition{condition=\"Ready\"}", time.Now()) if warnings != nil...
If you pass `model.Earliest.Time()` to prometheus/client_golang it sends -9223372036854776, which is 192 milliseconds less than the original. This value will cause an overflow when read by `prometheus/web/api/v1`, turning it into...
When exposing counters without `_total` suffixes in Open Metrics exposition format metric type is lost. Using `github.com/prometheus/client_golang v1.11.0`. Code to reproduce: ``` package main import ( "fmt" "net/http" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp"...
The Counter and Histogram constructors return interfaces instead of pointers to structs. Now the constructor for Counter returns a Counter interface whose underlying type implements both Counter and ExemplarAdder and...
Hey, I'm currently using these two functions to query some data from Thanos with this API client. https://github.com/prometheus/client_golang/blob/196536534fbba6249b94d4ccb2269cf162ceef44/api/prometheus/v1/api.go#L803 https://github.com/prometheus/client_golang/blob/196536534fbba6249b94d4ccb2269cf162ceef44/api/prometheus/v1/api.go#L821 Now, I don't want partial responses from Thanos but rather want...