Open zohnannor opened 9 months ago
I realized now that the error was coming from the OpenTelemetry collector I was using. So the error mentioned could not be resolved from the application side even if the methods were accessible and max_{en,de}coding_message_size
values could be configured. But the issue is still relevant.
Related to #837
Problem
In #1016,
tonic
was bumped to0.9
and the methods were added toTraceServiceClient
for configuring themax_{en,de}coding_message_size
values used bytonic
. However, (I assume this was overlooked) there's no way of calling those methods from theopentelemetry_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 in0.20
(the currently most recent published version) with the default values.https://github.com/open-telemetry/opentelemetry-rust/blob/dfeac078ff7853e7dc814778524b93470dfa5c9c/opentelemetry-otlp/src/span.rs#L391
Now, it is created here
https://github.com/open-telemetry/opentelemetry-rust/blob/08c3d48dc8661773d96b3ab31994db624ac4a8eb/opentelemetry-otlp/src/exporter/tonic/trace.rs#L34
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 foropentelemetry_otlp::OtlpExporterPipeline
, is unused in thebuild_channel
implementation.