about summary refs log tree commit diff
path: root/tvix/nar-bridge/pkg/http/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nar-bridge/pkg/http/server.go')
-rw-r--r--tvix/nar-bridge/pkg/http/server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/nar-bridge/pkg/http/server.go b/tvix/nar-bridge/pkg/http/server.go
index 500902f262f0..aecbd54aec16 100644
--- a/tvix/nar-bridge/pkg/http/server.go
+++ b/tvix/nar-bridge/pkg/http/server.go
@@ -12,6 +12,7 @@ import (
 	"github.com/go-chi/chi/middleware"
 	"github.com/go-chi/chi/v5"
 	log "github.com/sirupsen/logrus"
+	"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
 )
 
 type Server struct {
@@ -46,6 +47,9 @@ func New(
 	priority int,
 ) *Server {
 	r := chi.NewRouter()
+	r.Use(func(h http.Handler) http.Handler {
+		return otelhttp.NewHandler(h, "http.request")
+	})
 
 	if enableAccessLog {
 		r.Use(middleware.Logger)