Add missing tracing references to multiple services. (#7110)

This commit is contained in:
Daniel Swärd
2023-08-23 15:17:17 +02:00
committed by GitHub
parent 55127fe413
commit 49fc22d532
28 changed files with 162 additions and 83 deletions
@@ -12,10 +12,12 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/cors"
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
ohttp "github.com/owncloud/ocis/v2/ocis-pkg/service/http"
"github.com/owncloud/ocis/v2/ocis-pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
serviceErrors "github.com/owncloud/ocis/v2/services/webfinger/pkg/service/v0"
svc "github.com/owncloud/ocis/v2/services/webfinger/pkg/service/v0"
"github.com/pkg/errors"
"github.com/riandyrn/otelchi"
"go-micro.dev/v4"
)
@@ -62,6 +64,15 @@ func Server(opts ...Option) (ohttp.Service, error) {
version.String,
))
mux.Use(
otelchi.Middleware(
options.Name,
otelchi.WithChiRoutes(mux),
otelchi.WithTracerProvider(options.TraceProvider),
otelchi.WithPropagators(tracing.GetPropagator()),
),
)
var oidcHTTPClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{