diff --git a/metrics/readme.go b/metrics/readme.go index bd49412..9273505 100644 --- a/metrics/readme.go +++ b/metrics/readme.go @@ -12,7 +12,7 @@ func Readme() string { if gatherer, err := prometheus.DefaultGatherer.Gather(); err == nil { for _, value := range gatherer { rows = append(rows, []string{ - value.GetName(), + markdown.Code(value.GetName()), value.GetType().String(), value.GetHelp(), }) diff --git a/service/httpreadme_test.go b/service/httpreadme_test.go index 1411c03..ab374af 100644 --- a/service/httpreadme_test.go +++ b/service/httpreadme_test.go @@ -155,8 +155,8 @@ func ExampleNewHTTPReadme() { // // | Name | Type | Description | // | ---------------------------------- | ------- | ------------------------------------------------------------------ | - // | foo_bar_total | COUNTER | Foo bar metrics | - // | foo_baz_total | COUNTER | Foo baz metrics | + // | `foo_bar_total` | COUNTER | Foo bar metrics | + // | `foo_baz_total` | COUNTER | Foo baz metrics | // | `go_gc_duration_seconds` | SUMMARY | A summary of the pause duration of garbage collection cycles. | // | `go_goroutines` | GAUGE | Number of goroutines that currently exist. | // | `go_info` | GAUGE | Information about the Go environment. |