fix failing opencensus tests (#1021)
Ryan Lang authored 3 years ago
GitHub committed 3 years ago
50 | 50 |
}
|
51 | 51 |
|
52 | 52 |
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 |
)
|
54 | 57 |
|
55 | 58 |
ep := grpctransport.NewClient(
|
56 | 59 |
cc,
|
|
135 | 138 |
func(context.Context, interface{}) (interface{}, error) {
|
136 | 139 |
return nil, tr.err
|
137 | 140 |
},
|
138 | |
ockit.GRPCServerTrace(ockit.WithName(tr.name)),
|
|
141 |
ockit.GRPCServerTrace(
|
|
142 |
ockit.WithName(tr.name),
|
|
143 |
ockit.WithSampler(trace.AlwaysSample()),
|
|
144 |
),
|
139 | 145 |
)
|
140 | 146 |
|
141 | 147 |
if tr.useParent {
|
37 | 37 |
}
|
38 | 38 |
|
39 | 39 |
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 |
)
|
41 | 44 |
ep := kithttp.NewClient(
|
42 | 45 |
"GET",
|
43 | 46 |
rURL,
|
|
116 | 119 |
func(context.Context, http.ResponseWriter, interface{}) error { return errors.New("dummy") },
|
117 | 120 |
ockit.HTTPServerTrace(
|
118 | 121 |
ockit.WithName(tr.name),
|
|
122 |
ockit.WithSampler(trace.AlwaysSample()),
|
119 | 123 |
ockit.WithHTTPPropagation(tr.propagation),
|
120 | 124 |
),
|
121 | 125 |
)
|
|
133 | 137 |
if tr.useParent {
|
134 | 138 |
client = http.Client{
|
135 | 139 |
Transport: &ochttp.Transport{
|
|
140 |
StartOptions: trace.StartOptions{
|
|
141 |
Sampler: trace.AlwaysSample(),
|
|
142 |
},
|
136 | 143 |
Propagation: tr.propagation,
|
137 | 144 |
},
|
138 | 145 |
}
|