This repository was archived by the owner on Apr 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
google/cloud/bigtable/data/_metrics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818from google .cloud .bigtable .data ._metrics .data_model import OperationType
1919from google .cloud .bigtable .data ._metrics .data_model import ActiveOperationMetric
20+ from google .cloud .bigtable .data ._metrics .data_model import ActiveAttemptMetric
21+ from google .cloud .bigtable .data ._metrics .data_model import CompletedOperationMetric
22+ from google .cloud .bigtable .data ._metrics .data_model import CompletedAttemptMetric
2023
2124__all__ = (
2225 "BigtableClientSideMetricsController" ,
2326 "OperationType" ,
2427 "ActiveOperationMetric" ,
28+ "ActiveAttemptMetric" ,
29+ "CompletedOperationMetric" ,
30+ "CompletedAttemptMetric" ,
2531)
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ def start(self) -> None:
184184 return self ._handle_error (INVALID_STATE_ERROR .format ("start" , self .state ))
185185 self .start_time_ns = time .monotonic_ns ()
186186
187- def start_attempt (self ) -> None :
187+ def start_attempt (self ) -> ActiveAttemptMetric :
188188 """
189189 Called to initiate a new attempt for the operation.
190190
@@ -210,6 +210,7 @@ def start_attempt(self) -> None:
210210 backoff_ns = 0
211211
212212 self .active_attempt = ActiveAttemptMetric (backoff_before_attempt_ns = backoff_ns )
213+ return self .active_attempt
213214
214215 def add_response_metadata (self , metadata : dict [str , bytes | str ]) -> None :
215216 """
You can’t perform that action at this time.
0 commit comments