Expose /metrics endpoint on admin socket via promhttp
This commit is contained in:
parent
d474634451
commit
98f3de14d7
1 changed files with 3 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
admin "git.happydns.org/happyDomain/internal/api-admin/route"
|
||||
providerUC "git.happydns.org/happyDomain/internal/usecase/provider"
|
||||
|
|
@ -56,6 +57,8 @@ func NewAdmin(app *App) *Admin {
|
|||
// Prepare usecases (admin uses unrestricted provider access)
|
||||
app.usecases.providerAdmin = providerUC.NewService(app.store, nil)
|
||||
|
||||
router.GET("/metrics", gin.WrapH(promhttp.Handler()))
|
||||
|
||||
admin.DeclareRoutes(
|
||||
app.cfg,
|
||||
router,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue