Let's instrument the search string with the duration
This commit is contained in:
parent
5eca3843cc
commit
c6354c46c8
4 changed files with 7 additions and 7 deletions
|
@ -37,7 +37,7 @@ func Init() Instrument {
|
|||
Name: "trantor_request_duration_seconds",
|
||||
Help: "Duration of the request in seconds.",
|
||||
},
|
||||
[]string{"section"},
|
||||
[]string{"section", "search"},
|
||||
)
|
||||
|
||||
prometheus.MustRegister(visits)
|
||||
|
@ -61,6 +61,6 @@ func (in promInst) Visit(section string, id string, search string, fmt string) {
|
|||
in.visits.WithLabelValues(section, id, search, fmt).Inc()
|
||||
}
|
||||
|
||||
func (in promInst) Duration(section string, duration time.Duration) {
|
||||
in.reqDur.WithLabelValues(section).Observe(duration.Seconds())
|
||||
func (in promInst) Duration(section string, search string, duration time.Duration) {
|
||||
in.reqDur.WithLabelValues(section, search).Observe(duration.Seconds())
|
||||
}
|
||||
|
|
Reference in a new issue