-
Couldn't load subscription status.
- Fork 586
Description
Related to #837
Problem
In #1016, tonic was bumped to 0.9 and the methods were added to TraceServiceClient for configuring the max_{en,de}coding_message_size values used by tonic. However, (I assume this was overlooked) there's no way of calling those methods from the opentelemetry_otlp::OtlpExporterPipeline public API, so users are stuck with the default values.
This causes OpenTelemetry trace error occurred. Exporter otlp encountered the following error(s): the grpc server returns error (Some resource has been exhausted): , detailed error message: grpc: received message larger than max (5696602 vs. 4194304) error to happen with no way of fixing it.
Solution
TraceServiceClient created here in 0.20 (the currently most recent published version) with the default values.
| let mut trace_exporter = TonicTraceServiceClient::new(channel); |
Now, it is created here
| let mut client = TraceServiceClient::new(channel); |
without any (except for send_compressed) configuration, as well.
We should expose a way for users of the library to configure the underlying TraceServiceClient.
While digging in the code, I also noticed that the custom tonic::transport::Channel one can configure for opentelemetry_otlp::OtlpExporterPipeline, is unused in the build_channel implementation.