I believe the problem is that tonic 0.12 now requires explicitly setting use_webpki_roots() or use_native_roots() in ClientTlsConfig, and does not implicitly default to enabling them if not enabled (See this PR here https://github.com/hyperium/tonic/pull/1731)
So the fix would be to make sure ClientTlsConfig explicitly calls .use_webpki_roots() or .use_native_roots() in all places that they are created (depending on enabled features.
API Version
Crate version 0.20
SDK Version
Crate version 0.24
What component are you working with?
opentelemetry-stackdriver
Relevant log output
Error: Logging failed to set up
Caused by:
0: Failed to init stackdriver exporter
1: tonic error: transport error
2: transport error
3: invalid peer certificate: UnknownIssuer
4: invalid peer certificate: UnknownIssuer
What happened?
When updating from 0.20 to 0.21, I am seeing this error
This is caused by this line in
StackDriverExporter::Builder::build
https://github.com/open-telemetry/opentelemetry-rust-contrib/blob/9cd566be64aba0b5256726a5418c6d2abc2d3cd1/opentelemetry-stackdriver/src/lib.rs#L188
I believe the problem is that tonic 0.12 now requires explicitly setting
use_webpki_roots()
oruse_native_roots()
inClientTlsConfig
, and does not implicitly default to enabling them if not enabled (See this PR here https://github.com/hyperium/tonic/pull/1731)So the fix would be to make sure
ClientTlsConfig
explicitly calls.use_webpki_roots()
or.use_native_roots()
in all places that they are created (depending on enabled features.API Version
Crate version 0.20
SDK Version
Crate version 0.24
What component are you working with?
opentelemetry-stackdriver
Relevant log output