Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Stackdriver exporter fails to build with tonic certificate error when updating to 0.21 #95

Closed
msdrigg opened this issue Jul 26, 2024 · 0 comments · Fixed by #96
Closed
Labels
bug Something isn't working

Comments

@msdrigg
Copy link
Contributor

msdrigg commented Jul 26, 2024

What happened?

When updating from 0.20 to 0.21, I am seeing this error

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

This is caused by this line in StackDriverExporter::Builder::build

.map_err(|e| Error::Transport(e.into()))?;

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 hyperium/tonic#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
@msdrigg msdrigg added the bug Something isn't working label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant