File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
87
87
([ #4353 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/4353 ) )
88
88
- sdk: don't log or print warnings when the SDK has been disabled
89
89
([ #4371 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/4371 ) )
90
+ - Configurable max retry timeout for grpc exporter
91
+ ([ #4333 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/4333 ) )
90
92
- Fix span context manager typing by using ParamSpec from typing_extensions
91
93
([ #4389 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/4389 ) )
92
94
- Fix serialization of None values in logs body to match 1.31.0+ data model
Original file line number Diff line number Diff line change @@ -187,6 +187,8 @@ class OTLPExporterMixin(
187
187
compression: gRPC compression method to use
188
188
"""
189
189
190
+ _MAX_RETRY_TIMEOUT = 64
191
+
190
192
def __init__ (
191
193
self ,
192
194
endpoint : Optional [str ] = None ,
@@ -286,12 +288,13 @@ def _export(
286
288
# data.__class__.__name__,
287
289
# delay,
288
290
# )
289
- max_value = 64
290
291
# expo returns a generator that yields delay values which grow
291
292
# exponentially. Once delay is greater than max_value, the yielded
292
293
# value will remain constant.
293
- for delay in _create_exp_backoff_generator (max_value = max_value ):
294
- if delay == max_value or self ._shutdown :
294
+ for delay in _create_exp_backoff_generator (
295
+ max_value = self ._MAX_RETRY_TIMEOUT
296
+ ):
297
+ if delay == self ._MAX_RETRY_TIMEOUT or self ._shutdown :
295
298
return self ._result .FAILURE
296
299
297
300
with self ._export_lock :
You can’t perform that action at this time.
0 commit comments