Skip to content

Commit a53fe02

Browse files
committed
fix(http_exporter): use correct class after rebase
1 parent f33957f commit a53fe02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def export(
191191
try:
192192
resp = self._export(serialized_data, deadline_sec - time())
193193
if resp.ok:
194-
return LogExportResult.SUCCESS
194+
return LogRecordExportResult.SUCCESS
195195
except requests.exceptions.RequestException as error:
196196
reason = str(error)
197197
retryable = isinstance(error, ConnectionError)
@@ -207,7 +207,7 @@ def export(
207207
status_code,
208208
reason,
209209
)
210-
return LogExportResult.FAILURE
210+
return LogRecordExportResult.FAILURE
211211

212212
if (
213213
retry_num + 1 == _MAX_RETRYS

exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def test_export_no_collector_available_retryable(self, mock_post):
494494
# Set timeout to 1.5 seconds
495495
self.assertEqual(
496496
exporter.export(self._get_sdk_log_data()),
497-
LogExportResult.FAILURE,
497+
LogRecordExportResult.FAILURE,
498498
)
499499
after = time.time()
500500
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
@@ -516,7 +516,7 @@ def test_export_no_collector_available(self, mock_post):
516516
# Set timeout to 1.5 seconds
517517
self.assertEqual(
518518
exporter.export(self._get_sdk_log_data()),
519-
LogExportResult.FAILURE,
519+
LogRecordExportResult.FAILURE,
520520
)
521521
# First call at time 0, second at time 1, then an early return before the second backoff sleep b/c it would exceed timeout.
522522
self.assertEqual(mock_post.call_count, 1)

0 commit comments

Comments
 (0)