This repository was archived by the owner on Apr 1, 2025. It is now read-only.
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,10 @@ import "github.com/rcrowley/go-metrics/stathat"
90
90
go stathat.
Stathat (metrics.
DefaultRegistry ,
10e9 ,
" [email protected] " )
91
91
```
92
92
93
- Maintain all metrics along with expvars at ` /debug/vars2 ` :
93
+ Maintain all metrics along with expvars at ` /debug/metrics ` :
94
94
95
95
This uses the same mechanism as [ the official expvar] ( http://golang.org/pkg/expvar/ )
96
- but exposed under ` /debug/vars2 ` , which shows a json representation of all your usual expvars
96
+ but exposed under ` /debug/metrics ` , which shows a json representation of all your usual expvars
97
97
as well as all your go-metrics.
98
98
99
99
Original file line number Diff line number Diff line change 1
1
// Hook go-metrics into expvar
2
- // on any /debug/vars2 request, load all vars from the registry into expvar, and execute regular expvar handler
2
+ // on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
3
3
package exp
4
4
5
5
import (
@@ -39,7 +39,7 @@ func Exp(r metrics.Registry) {
39
39
// panic: http: multiple registrations for /debug/vars
40
40
// http.HandleFunc("/debug/vars", e.expHandler)
41
41
// haven't found an elegant way, so just use a different endpoint
42
- http .HandleFunc ("/debug/vars2 " , e .expHandler )
42
+ http .HandleFunc ("/debug/metrics " , e .expHandler )
43
43
}
44
44
45
45
func (exp * exp ) getInt (name string ) * expvar.Int {
You can’t perform that action at this time.
0 commit comments