Documentation
¶
Overview ¶
wfiber is a wrapped fiber
Index ¶
- func ChangeLoggerLevel(hack utility.Hack, wlogger *wlog.Logger) fiber.Handler
- func GormTX(db *gorm.DB, skip func(ctx *fiber.Ctx) bool, wlogger *wlog.Logger) fiber.Handler
- func O11YLogger(debug bool, enableTrace bool, wlogger *wlog.Logger) (fiber.Handler, fiber.Handler)
- func O11YTrace(enableTrace bool) fiber.Handler
- func ShowRoutes(router *fiber.App)
- type O11YMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeLoggerLevel ¶
func O11YLogger ¶
O11YLogger
handler1: logs HTTP messages
handler2: adds a logger with req_id to the standard context, allowing subsequent functions to use logger from ctx
func ShowRoutes ¶
Types ¶
type O11YMetric ¶
type O11YMetric struct {
ResponseSecond *prometheus.HistogramVec
RequestsTotal *prometheus.CounterVec
RequestsResult *prometheus.CounterVec
RequestsInflight *prometheus.GaugeVec
}
func NewO11YMetric ¶
func NewO11YMetric(svcName string) *O11YMetric
func (*O11YMetric) Middleware ¶
func (m *O11YMetric) Middleware(c *fiber.Ctx) error
Click to show internal directories.
Click to hide internal directories.