Skip to content

Commit 5ee4f71

Browse files
authored
chore(app/trace_collector): remove Default bounds (#3651)
see linkerd/linkerd2#8733 for more information. in hyper 1.x, `Incoming` bodies do not provide a `Default` implementation. compare the trait implementations here: * https://docs.rs/hyper/0.14.31/hyper/body/struct.Body.html#impl-Default-for-Body * https://docs.rs/hyper/latest/hyper/body/struct.Incoming.html#trait-implementations this commit removes these bounds from the `linkerd_app::trace_collector::otel_collector::SpanExporter<T, S>` and other connected functions. Signed-off-by: katelyn martin <[email protected]>
1 parent ea8a970 commit 5ee4f71

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

linkerd/app/src/trace_collector/otel_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ where
3434
S: GrpcService<BoxBody> + Clone + Send + 'static,
3535
S::Error: Into<Error>,
3636
S::Future: Send,
37-
S::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
37+
S::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
3838
<S::ResponseBody as Body>::Error: Into<Error> + Send,
3939
{
4040
let (span_sink, spans_rx) = mpsc::channel(crate::trace_collector::SPAN_BUFFER_CAPACITY);

linkerd/opencensus/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub async fn export_spans<T, S>(client: T, node: Node, spans: S, metrics: Regist
2424
where
2525
T: GrpcService<BoxBody> + Clone,
2626
T::Error: Into<Error>,
27-
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
27+
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
2828
<T::ResponseBody as Body>::Error: Into<Error> + Send,
2929
S: Stream<Item = ExportSpan> + Unpin,
3030
{
@@ -49,7 +49,7 @@ impl<T, S> SpanExporter<T, S>
4949
where
5050
T: GrpcService<BoxBody>,
5151
T::Error: Into<Error>,
52-
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
52+
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
5353
<T::ResponseBody as Body>::Error: Into<Error> + Send,
5454
S: Stream<Item = ExportSpan> + Unpin,
5555
{

linkerd/opentelemetry/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub async fn export_spans<T, S>(
3939
) where
4040
T: GrpcService<BoxBody> + Clone,
4141
T::Error: Into<Error>,
42-
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
42+
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
4343
<T::ResponseBody as Body>::Error: Into<Error> + Send,
4444
S: Stream<Item = ExportSpan> + Unpin,
4545
{
@@ -66,7 +66,7 @@ impl<T, S> SpanExporter<T, S>
6666
where
6767
T: GrpcService<BoxBody> + Clone,
6868
T::Error: Into<Error>,
69-
T::ResponseBody: Default + Body<Data = tonic::codegen::Bytes> + Send + 'static,
69+
T::ResponseBody: Body<Data = tonic::codegen::Bytes> + Send + 'static,
7070
<T::ResponseBody as Body>::Error: Into<Error> + Send,
7171
S: Stream<Item = ExportSpan> + Unpin,
7272
{

0 commit comments

Comments
 (0)