Closed templatedop closed 2 months ago
Hey, You can write a pproff
module that has basic functionalities. and this module can be used with app.Use
. And fiber has pproff
middleware. so this could be a good boilerplate code for pprof module.
package pprof
import (
"github.com/Trendyol/chaki/config"
"github.com/Trendyol/chaki/module"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/pprof"
)
func Module() *module.Module {
return module.New(ModuleName).Provide(newPproffMiddleware)
}
func newPproffMiddleware(cfg *config.Config) fiber.Handler {
// TODO: build pprof.Config using config instance
c := pprof.Config{}
return pprof.New(c)
}
Thank you
Can we integrate with pprof Request to please help in understand how to integrate pprof in chaki. Thank you.