add pagination

This commit is contained in:
Aleksandr Trushkin
2024-04-07 23:49:06 +03:00
parent 68810d93a7
commit 605e117586
23 changed files with 639 additions and 153 deletions

View File

@ -22,7 +22,7 @@ import (
"go.opentelemetry.io/otel/sdk/trace"
)
var webtracer = otel.Tracer("kuriweb")
var webtracer = otel.Tracer("kuriweb.http")
type shutdownFunc func(context.Context) error
@ -126,7 +126,7 @@ func newMeterProvider() (*metric.MeterProvider, error) {
return meterProvider, nil
}
func muxHandleFunc(router *mux.Router, path string, hf http.HandlerFunc) *mux.Route {
func muxHandleFunc(router *mux.Router, name, path string, hf http.HandlerFunc) *mux.Route {
h := otelhttp.WithRouteTag(path, hf)
return router.Handle(path, h)
return router.Handle(path, h).Name(name)
}