Skip to content

Commit fb6043b

Browse files
Update http metric exporter batch return to be like grpc
1 parent e7c80e5 commit fb6043b

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ def export(
296296
)
297297

298298
if batch_result == MetricExportResult.FAILURE:
299-
export_result = MetricExportResult.FAILURE
300-
# Don't retry; move on to next batch
299+
# If any batch fails, return failure immediately
300+
return MetricExportResult.FAILURE
301301

302-
# Return last result after all batches are attempted
302+
# Return SUCCESS only if all batches succeeded
303303
return export_result
304304

305305
def _split_metrics_data(

0 commit comments

Comments
 (0)