Skip to content

Commit 4009de1

Browse files
nit: add shutdown function
Signed-off-by: Shivanshu Raj Shrivastava <[email protected]>
1 parent e48e6f4 commit 4009de1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

opentelemetry-otlp/src/span.rs

+8
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,12 @@ impl opentelemetry_sdk::trace::SpanExporter for SpanExporter {
159159
SupportedTransportClient::Http(client) => client.set_resource(resource),
160160
}
161161
}
162+
fn shutdown(&self) -> OTelSdkResult {
163+
match &self.client {
164+
#[cfg(feature = "grpc-tonic")]
165+
SupportedTransportClient::Tonic(client) => client.shutdown(),
166+
#[cfg(any(feature = "http-proto", feature = "http-json"))]
167+
SupportedTransportClient::Http(client) => client.shutdown(),
168+
}
169+
}
162170
}

0 commit comments

Comments
 (0)