File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
sentry_sdk/integrations/grpc/aio Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 66 ClientCallDetails ,
77 UnaryUnaryCall ,
88 UnaryStreamCall ,
9+ Metadata ,
910)
1011from google .protobuf .message import Message
1112
@@ -20,20 +21,10 @@ class ClientInterceptor:
2021 def _update_client_call_details_metadata_from_scope (
2122 client_call_details : ClientCallDetails ,
2223 ) -> ClientCallDetails :
23- metadata = (
24- list (client_call_details .metadata ) if client_call_details .metadata else []
25- )
24+ if client_call_details .metadata is None :
25+ client_call_details = client_call_details ._replace (metadata = Metadata ())
2626 for key , value in Scope .get_current_scope ().iter_trace_propagation_headers ():
27- metadata .append ((key , value ))
28-
29- client_call_details = ClientCallDetails (
30- method = client_call_details .method ,
31- timeout = client_call_details .timeout ,
32- metadata = metadata ,
33- credentials = client_call_details .credentials ,
34- wait_for_ready = client_call_details .wait_for_ready ,
35- )
36-
27+ client_call_details .metadata .add (key , value )
3728 return client_call_details
3829
3930
You can’t perform that action at this time.
0 commit comments