Codebase list golang-github-go-kit-kit / 6c17021
fix failing opencensus tests (#1021) Ryan Lang authored 3 years ago GitHub committed 3 years ago
2 changed file(s) with 16 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5050 }
5151
5252 for _, tr := range traces {
53 clientTracer := ockit.GRPCClientTrace(ockit.WithName(tr.name))
53 clientTracer := ockit.GRPCClientTrace(
54 ockit.WithName(tr.name),
55 ockit.WithSampler(trace.AlwaysSample()),
56 )
5457
5558 ep := grpctransport.NewClient(
5659 cc,
135138 func(context.Context, interface{}) (interface{}, error) {
136139 return nil, tr.err
137140 },
138 ockit.GRPCServerTrace(ockit.WithName(tr.name)),
141 ockit.GRPCServerTrace(
142 ockit.WithName(tr.name),
143 ockit.WithSampler(trace.AlwaysSample()),
144 ),
139145 )
140146
141147 if tr.useParent {
3737 }
3838
3939 for _, tr := range traces {
40 clientTracer := ockit.HTTPClientTrace(ockit.WithName(tr.name))
40 clientTracer := ockit.HTTPClientTrace(
41 ockit.WithName(tr.name),
42 ockit.WithSampler(trace.AlwaysSample()),
43 )
4144 ep := kithttp.NewClient(
4245 "GET",
4346 rURL,
116119 func(context.Context, http.ResponseWriter, interface{}) error { return errors.New("dummy") },
117120 ockit.HTTPServerTrace(
118121 ockit.WithName(tr.name),
122 ockit.WithSampler(trace.AlwaysSample()),
119123 ockit.WithHTTPPropagation(tr.propagation),
120124 ),
121125 )
133137 if tr.useParent {
134138 client = http.Client{
135139 Transport: &ochttp.Transport{
140 StartOptions: trace.StartOptions{
141 Sampler: trace.AlwaysSample(),
142 },
136143 Propagation: tr.propagation,
137144 },
138145 }