words: whitelist prometheus
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
1
.words
1
.words
@ -27,6 +27,7 @@ localhost
|
|||||||
mutex
|
mutex
|
||||||
prefetching
|
prefetching
|
||||||
protobuf
|
protobuf
|
||||||
|
prometheus
|
||||||
repin
|
repin
|
||||||
serializable
|
serializable
|
||||||
teardown
|
teardown
|
||||||
|
@ -46,7 +46,7 @@ func ExampleClient_metrics() {
|
|||||||
// get a key so it shows up in the metrics as a range RPC
|
// get a key so it shows up in the metrics as a range RPC
|
||||||
cli.Get(context.TODO(), "test_key")
|
cli.Get(context.TODO(), "test_key")
|
||||||
|
|
||||||
// listen for all prometheus metrics
|
// listen for all Prometheus metrics
|
||||||
ln, err := net.Listen("tcp", ":0")
|
ln, err := net.Listen("tcp", ":0")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@ -61,7 +61,7 @@ func ExampleClient_metrics() {
|
|||||||
<-donec
|
<-donec
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// make an http request to fetch all prometheus metrics
|
// make an http request to fetch all Prometheus metrics
|
||||||
url := "http://" + ln.Addr().String() + "/metrics"
|
url := "http://" + ln.Addr().String() + "/metrics"
|
||||||
resp, err := http.Get(url)
|
resp, err := http.Get(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -44,7 +44,7 @@ func TestV3ClientMetrics(t *testing.T) {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
|
|
||||||
// listen for all prometheus metrics
|
// listen for all Prometheus metrics
|
||||||
donec := make(chan struct{})
|
donec := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
defer close(donec)
|
defer close(donec)
|
||||||
|
Reference in New Issue
Block a user