@@ -15,6 +15,7 @@ import (
1515 "github.com/go-chi/chi/v5/middleware"
1616 ldapv3 "github.com/go-ldap/ldap/v3"
1717 "github.com/jellydator/ttlcache/v3"
18+ "github.com/riandyrn/otelchi"
1819 microstore "go-micro.dev/v4/store"
1920
2021 "github.com/opencloud-eu/reva/v2/pkg/events"
@@ -28,6 +29,7 @@ import (
2829 "github.com/opencloud-eu/opencloud/pkg/registry"
2930 "github.com/opencloud-eu/opencloud/pkg/roles"
3031 "github.com/opencloud-eu/opencloud/pkg/service/grpc"
32+ "github.com/opencloud-eu/opencloud/pkg/tracing"
3133 settingssvc "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/settings/v0"
3234 "github.com/opencloud-eu/opencloud/services/graph/pkg/identity"
3335 graphm "github.com/opencloud-eu/opencloud/services/graph/pkg/middleware"
@@ -128,6 +130,14 @@ func NewService(opts ...Option) (Graph, error) { //nolint:maintidx
128130
129131 m := chi .NewMux ()
130132 m .Use (options .Middleware ... )
133+ m .Use (
134+ otelchi .Middleware (
135+ "graph" ,
136+ otelchi .WithChiRoutes (m ),
137+ otelchi .WithTracerProvider (options .TraceProvider ),
138+ otelchi .WithPropagators (tracing .GetPropagator ()),
139+ ),
140+ )
131141
132142 spacePropertiesCache := ttlcache .New (
133143 ttlcache.WithTTL [string , interface {}](
0 commit comments