diff --git a/examples/README.md b/examples/README.md index 150fd39..cf1812f 100644 --- a/examples/README.md +++ b/examples/README.md @@ -422,6 +422,8 @@ Endpoint: makeCountEndpoint(svc), // ... } + + http.Handle("/metrics", stdprometheus.Handler()) } ``` diff --git a/examples/stringsvc2/main.go b/examples/stringsvc2/main.go index f33dc64..7539c21 100644 --- a/examples/stringsvc2/main.go +++ b/examples/stringsvc2/main.go @@ -59,6 +59,7 @@ http.Handle("/uppercase", uppercaseHandler) http.Handle("/count", countHandler) + http.Handle("/metrics", stdprometheus.Handler()) _ = logger.Log("msg", "HTTP", "addr", ":8080") _ = logger.Log("err", http.ListenAndServe(":8080", nil)) } diff --git a/examples/stringsvc3/main.go b/examples/stringsvc3/main.go index 9f54e1d..04b7ba0 100644 --- a/examples/stringsvc3/main.go +++ b/examples/stringsvc3/main.go @@ -69,6 +69,7 @@ http.Handle("/uppercase", uppercaseHandler) http.Handle("/count", countHandler) + http.Handle("/metrics", stdprometheus.Handler()) _ = logger.Log("msg", "HTTP", "addr", *listen) _ = logger.Log("err", http.ListenAndServe(*listen, nil)) }