Skip to content

Commit 69c02e8

Browse files
committed
fix: add track count to /debug/vars metrics endpoint
fixes #392
1 parent 9818523 commit 69c02e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/gonic/gonic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ func main() {
267267
mux.Handle("/debug/vars", expvar.Handler())
268268
expvar.Publish("stats", expvar.Func(func() any {
269269
var stats struct{ Albums, Tracks, Artists, InternetRadioStations, Podcasts uint }
270+
dbc.Model(db.Track{}).Count(&stats.Tracks)
270271
dbc.Model(db.Album{}).Count(&stats.Albums)
271272
dbc.Model(db.Artist{}).Count(&stats.Artists)
272273
dbc.Model(db.InternetRadioStation{}).Count(&stats.InternetRadioStations)

0 commit comments

Comments
 (0)