Skip to content

Commit b44895d

Browse files
committed
remove backoff time from application blocking latencies
1 parent 491c5f9 commit b44895d

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

‎packages/google-cloud-bigtable/google/cloud/bigtable/data/_metrics/data_model.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ class ActiveAttemptMetric:
140140
# time waiting on user to process the response, in nanoseconds
141141
# currently only relevant for ReadRows
142142
application_blocking_time_ns: int = 0
143-
# backoff time is added to application_blocking_time_ns
144143
backoff_before_attempt_ns: int = 0
145144

146145

‎packages/google-cloud-bigtable/google/cloud/bigtable/data/_metrics/handlers/opentelemetry.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ def on_attempt_complete(
234234
)
235235
self.otel.throttling_latencies.record(flow_throttling, labels)
236236
self.otel.application_latencies.record(
237-
(attempt.application_blocking_time_ns + attempt.backoff_before_attempt_ns)
238-
/ NS_TO_MS,
237+
attempt.application_blocking_time_ns / NS_TO_MS,
239238
labels,
240239
)
241240
if attempt.gfe_latency_ns is not None:

‎packages/google-cloud-bigtable/tests/unit/data/_metrics/test_opentelemetry_handler.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ def test_on_attempt_complete_application_latencies(self):
361361
op = ActiveOperationMetric(op_type=OperationType.READ_ROWS)
362362
handler.on_attempt_complete(attempt, op)
363363
mock_instruments.application_latencies.record.assert_called_once_with(
364-
(attempt.application_blocking_time_ns + attempt.backoff_before_attempt_ns)
365-
/ 1e6,
364+
attempt.application_blocking_time_ns / 1e6,
366365
mock.ANY,
367366
)
368367

0 commit comments

Comments
 (0)