Skip to content

Commit

Permalink
Add noop tracer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Aug 21, 2022
1 parent 35416aa commit dc95715
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 434 deletions.
4 changes: 1 addition & 3 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ func (c *client) Call(service string, path string, reqval interface{}, respval i

ctx = tracing.ExtractFromMessage(ctx, parentReq)

ctx, span := c.tracer.Start(ctx, path)
ctx, span := c.tracer.Start(ctx, path, trace.WithAttributes(attribute.String("peer.service", service)))
defer span.End()

span.SetAttributes(attribute.String("peer.service", service))

if c.disc == nil {
panic("no discovery has been set up")
}
Expand Down
14 changes: 5 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ module github.com/MouseHatGames/mice
go 1.15

require (
github.com/google/uuid v1.3.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/google/uuid v1.3.0
github.com/kr/pretty v0.1.0 // indirect
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0 // indirect
go.opentelemetry.io/otel/sdk v1.9.0 // indirect
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect
google.golang.org/protobuf v1.28.1 // indirect
go.opentelemetry.io/otel v1.9.0
go.opentelemetry.io/otel/trace v1.9.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
)
Loading

0 comments on commit dc95715

Please sign in to comment.