Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wazazaby authored Oct 8, 2023
1 parent 5b6bee0 commit 92d3e02
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
)

func getCassandraQueryCounter(name string, host net.IP) *vm.Counter {
metric := vimebu.
Metric("cassandra_query_total").
Label("name", name).
Label("host", host.String()).
String() // cassandra_query_total{name="beep",host="1.2.3.4"}
var b vimebu.Builder
b.Metric("cassandra_query_total")
b.Label("name", name)
b.Label("host", host.String())
metric := b.String() // cassandra_query_total{name="beep",host="1.2.3.4"}
return vm.GetOrCreateCounter(metric)
}
```
Expand Down Expand Up @@ -64,10 +64,10 @@ import (
)

func getHTTPRequestCounter(path string) *vm.Counter {
metric := vimebu.
Metric("api_http_requests_total").
LabelQuote("path", path).
String() // api_http_requests_total{path="some/bro\"ken/path"}
var b vimebu.Builder
b.Metric("api_http_requests_total")
b.LabelQuote("path", path)
metric := b.String() // api_http_requests_total{path="some/bro\"ken/path"}
return vm.GetOrCreateCounter(metric)
}
```
Expand Down

0 comments on commit 92d3e02

Please sign in to comment.