Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions opentelemetry-otlp/allowed-external-types.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ allowed_external_types = [
"tonic::status::Code",
"tonic::status::Status",
"tonic::metadata::map::MetadataMap",
"tonic::transport::channel::tls::ClientTlsConfig",
"tonic::transport::tls::Certificate",
"tonic::transport::tls::Identity",
"tonic::transport::channel::Channel",
"tonic::transport::error::Error",
"tonic::service::interceptor::Interceptor",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that all of these should be reexported and removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bantonsson, thanks for the review!
The added types are the ones now re-exported.
I also updated the CI script to check allowed external types with all features enabled, because the previous configuration was correct but wasn't actually enforced (some re-exported types are feature-gated).
I've also cleaned up the old types that are no longer re-exported.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation @MathieuTricoire. Didn't know how that plugin works.

Expand Down
17 changes: 17 additions & 0 deletions opentelemetry-otlp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,20 @@ pub enum Protocol {
#[doc(hidden)]
/// Placeholder type when no exporter pipeline has been configured in telemetry pipeline.
pub struct NoExporterConfig(());

/// Re-exported types from the `tonic` crate.
#[cfg(feature = "grpc-tonic")]
pub mod tonic_types {
/// Re-exported types from `tonic::metadata`.
pub mod metadata {
#[doc(no_inline)]
pub use tonic::metadata::MetadataMap;
}

/// Re-exported types from `tonic::transport`.
#[cfg(feature = "tls")]
pub mod transport {
#[doc(no_inline)]
pub use tonic::transport::{Certificate, ClientTlsConfig, Identity};
}
}
Loading