@@ -165,6 +165,8 @@ async def intercept_unary_unary(
165165
166166 start_time = time .perf_counter ()
167167 method = client_call_details .method
168+ if isinstance (method , bytes ):
169+ method = method .decode ()
168170
169171 with self ._start_interceptor_span (method ) as span :
170172 new_details = self .propagate_trace_in_details (client_call_details )
@@ -193,6 +195,8 @@ async def intercept_unary_stream(
193195
194196 start_time = time .perf_counter ()
195197 method = client_call_details .method
198+ if isinstance (method , bytes ):
199+ method = method .decode ()
196200
197201 with self ._start_interceptor_span (method ) as span :
198202 new_details = self .propagate_trace_in_details (client_call_details )
@@ -218,6 +222,8 @@ async def intercept_stream_unary(
218222
219223 start_time = time .perf_counter ()
220224 method = client_call_details .method
225+ if isinstance (method , bytes ):
226+ method = method .decode ()
221227
222228 with self ._start_interceptor_span (method ) as span :
223229 new_details = self .propagate_trace_in_details (client_call_details )
@@ -243,6 +249,8 @@ async def intercept_stream_stream(
243249
244250 start_time = time .perf_counter ()
245251 method = client_call_details .method
252+ if isinstance (method , bytes ):
253+ method = method .decode ()
246254
247255 with self ._start_interceptor_span (method ) as span :
248256 new_details = self .propagate_trace_in_details (client_call_details )
0 commit comments