Package list golang-github-go-kit-kit / 93ae153
conform to rename of OpenTracing tags for RPC endpoints and fix for c&p mistake in addsvc example Bas van Beek 5 years ago
2 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
4141 {
4242 concatEndpoint = addsvc.MakeThriftConcatEndpoint(client)
4343 concatEndpoint = limiter(concatEndpoint)
44 sumEndpoint = circuitbreaker.Gobreaker(gobreaker.NewCircuitBreaker(gobreaker.Settings{
44 concatEndpoint = circuitbreaker.Gobreaker(gobreaker.NewCircuitBreaker(gobreaker.Settings{
4545 Name: "Concat",
4646 Timeout: 30 * time.Second,
47 }))(sumEndpoint)
47 }))(concatEndpoint)
4848 }
4949
5050 return addsvc.Endpoints{
2323 serverSpan.SetOperationName(operationName)
2424 }
2525 defer serverSpan.Finish()
26 otext.SpanKind.Set(serverSpan, otext.SpanKindRPCServer)
26 otext.SpanKindRPCServer.Set(serverSpan)
2727 ctx = opentracing.ContextWithSpan(ctx, serverSpan)
2828 return next(ctx, request)
2929 }
4545 clientSpan = tracer.StartSpan(operationName)
4646 }
4747 defer clientSpan.Finish()
48 otext.SpanKind.Set(clientSpan, otext.SpanKindRPCClient)
48 otext.SpanKindRPCClient.Set(clientSpan)
4949 ctx = opentracing.ContextWithSpan(ctx, clientSpan)
5050 return next(ctx, request)
5151 }