Skip to content

Commit

Permalink
chore: clean up according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
icyphox authored and zepatrik committed May 31, 2022
1 parent dc46d71 commit 554dab1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
Expand Down
5 changes: 3 additions & 2 deletions internal/driver/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"github.com/ory/analytics-go/v4"
"github.com/ory/x/healthx"
"github.com/ory/x/metricsx"
"github.com/ory/x/otelx"
"github.com/spf13/cobra"

"github.com/ory/keto/internal/driver/config"
Expand Down Expand Up @@ -128,7 +129,7 @@ func (r *RegistryDefault) serveRead(ctx context.Context, done chan<- struct{}) f
rt, s := r.ReadRouter(ctx), r.ReadGRPCServer(ctx)

if tracer := r.Tracer(ctx); tracer.IsLoaded() {
rt = x.TraceHandler(rt)
rt = otelx.TraceHandler(rt)
}

return func() error {
Expand All @@ -140,7 +141,7 @@ func (r *RegistryDefault) serveWrite(ctx context.Context, done chan<- struct{})
rt, s := r.WriteRouter(ctx), r.WriteGRPCServer(ctx)

if tracer := r.Tracer(ctx); tracer.IsLoaded() {
rt = x.TraceHandler(rt)
rt = otelx.TraceHandler(rt)
}

return func() error {
Expand Down
4 changes: 0 additions & 4 deletions internal/driver/registry_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ func (r *RegistryDefault) Tracer(ctx context.Context) *otelx.Tracer {
r.tracer = t
}

if r.tracer.Tracer() == nil {
r.tracer = otelx.NewNoop(r.l, r.Config(ctx).TracingConfig())
}

return r.tracer
}

Expand Down
14 changes: 0 additions & 14 deletions internal/x/tracing.go

This file was deleted.

0 comments on commit 554dab1

Please sign in to comment.