Skip to content

Commit 55dd9c0

Browse files
Removed None
1 parent 53e4b08 commit 55dd9c0

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

  • instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc

instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/_aio_client.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _start_interceptor_span(self, method):
9494
)
9595

9696
async def _wrap_unary_response(
97-
self, continuation, span, method=None, start_time=None
97+
self, continuation, span, method, start_time
9898
):
9999
status_code = grpc.StatusCode.OK
100100
try:
@@ -121,12 +121,9 @@ async def _wrap_unary_response(
121121
self.add_error_details_to_span(span, exc)
122122
raise exc
123123
finally:
124-
if start_time is not None:
125-
self._record_duration(method, start_time, status_code)
124+
self._record_duration(method, start_time, status_code)
126125

127-
async def _wrap_stream_response(
128-
self, span, call, method=None, start_time=None
129-
):
126+
async def _wrap_stream_response(self, span, call, method, start_time):
130127
status_code = grpc.StatusCode.OK
131128
try:
132129
async for response in call:
@@ -140,8 +137,7 @@ async def _wrap_stream_response(
140137
raise exc
141138
finally:
142139
span.end()
143-
if start_time is not None:
144-
self._record_duration(method, start_time, status_code)
140+
self._record_duration(method, start_time, status_code)
145141

146142
def tracing_skipped(self, client_call_details):
147143
return (

0 commit comments

Comments
 (0)