From 6b977112b8ec67f4de25a56b116811d04f376705 Mon Sep 17 00:00:00 2001 From: Sam Xie Date: Thu, 17 Apr 2025 01:23:45 -0700 Subject: [PATCH] Clarify comments for the `WithRetry` option in exporters (#6670) It's been a while since I last looked at the comment about retries. After re-reading it, I initially assumed the gRPC retry logic was handled by the gRPC library itself, but it's actually implemented in our code. Update the comment to make it clearer. --- exporters/otlp/otlplog/otlploggrpc/config.go | 5 +++-- exporters/otlp/otlpmetric/otlpmetricgrpc/config.go | 5 +++-- exporters/otlp/otlptrace/otlptracegrpc/options.go | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/exporters/otlp/otlplog/otlploggrpc/config.go b/exporters/otlp/otlplog/otlploggrpc/config.go index 65c3eb750..d0cc79d54 100644 --- a/exporters/otlp/otlplog/otlploggrpc/config.go +++ b/exporters/otlp/otlplog/otlploggrpc/config.go @@ -360,8 +360,9 @@ func WithTimeout(duration time.Duration) Option { // explicitly returns a backoff time in the response, that time will take // precedence over these settings. // -// These settings do not define any network retry strategy. That is entirely -// handled by the gRPC ClientConn. +// These settings define the retry strategy implemented by the exporter. +// These settings do not define any network retry strategy. +// That is handled by the gRPC ClientConn. // // If unset, the default retry policy will be used. It will retry the export // 5 seconds after receiving a retryable error and increase exponentially diff --git a/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go b/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go index db6e3714b..c831bb60b 100644 --- a/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go +++ b/exporters/otlp/otlpmetric/otlpmetricgrpc/config.go @@ -238,8 +238,9 @@ func WithTimeout(duration time.Duration) Option { // explicitly returns a backoff time in the response, that time will take // precedence over these settings. // -// These settings do not define any network retry strategy. That is entirely -// handled by the gRPC ClientConn. +// These settings define the retry strategy implemented by the exporter. +// These settings do not define any network retry strategy. +// That is handled by the gRPC ClientConn. // // If unset, the default retry policy will be used. It will retry the export // 5 seconds after receiving a retryable error and increase exponentially diff --git a/exporters/otlp/otlptrace/otlptracegrpc/options.go b/exporters/otlp/otlptrace/otlptracegrpc/options.go index 00ab1f20c..2da229870 100644 --- a/exporters/otlp/otlptrace/otlptracegrpc/options.go +++ b/exporters/otlp/otlptrace/otlptracegrpc/options.go @@ -199,8 +199,9 @@ func WithTimeout(duration time.Duration) Option { // explicitly returns a backoff time in the response. That time will take // precedence over these settings. // -// These settings do not define any network retry strategy. That is entirely -// handled by the gRPC ClientConn. +// These settings define the retry strategy implemented by the exporter. +// These settings do not define any network retry strategy. +// That is handled by the gRPC ClientConn. // // If unset, the default retry policy will be used. It will retry the export // 5 seconds after receiving a retryable error and increase exponentially