Skip to content

Commit 3c1de6b

Browse files
committed
Fix merge
1 parent 45b7f43 commit 3c1de6b

File tree

1 file changed

+9
-4
lines changed
  • exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter

1 file changed

+9
-4
lines changed

exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def __init__(
132132
preferred_temporality: dict[type, AggregationTemporality]
133133
| None = None,
134134
preferred_aggregation: dict[type, Aggregation] | None = None,
135-
*,
136135
max_export_batch_size: int | None = None,
136+
*,
137137
meter_provider: Optional[MeterProvider] = None,
138138
):
139139
"""OTLP HTTP metrics exporter
@@ -267,10 +267,15 @@ def _export_with_retries(
267267
deadline_sec: float,
268268
num_items: int,
269269
) -> MetricExportResult:
270-
if self._shutdown:
271-
_logger.warning("Exporter already shutdown, ignoring batch")
272-
return MetricExportResult.FAILURE
270+
"""Export serialized data with retry logic until success, non-transient error, or exponential backoff maxed out.
271+
272+
Args:
273+
export_request: ExportMetricsServiceRequest object containing metrics data to export
274+
deadline_sec: timestamp deadline for the export
273275
276+
Returns:
277+
MetricExportResult: SUCCESS if export succeeded, FAILURE otherwise
278+
"""
274279
with self._metrics.export_operation(num_items) as result:
275280
serialized_data = export_request.SerializeToString()
276281
deadline_sec = time() + self._timeout

0 commit comments

Comments
 (0)