Skip to content

Commit 752049d

Browse files
set attribute in start_span
1 parent 0cd6f4c commit 752049d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

sentry_sdk/integrations/grpc/client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ def intercept_unary_unary(
3939
attributes={
4040
"sentry.op": OP.GRPC_CLIENT,
4141
"sentry.origin": SPAN_ORIGIN,
42+
SPANDATA.RPC_METHOD: method,
4243
},
4344
) as span:
44-
span.set_attribute(SPANDATA.RPC_METHOD, method)
45-
4645
client_call_details = (
4746
self._update_client_call_details_metadata_from_scope(
4847
client_call_details
@@ -92,10 +91,9 @@ def intercept_unary_stream(
9291
attributes={
9392
"sentry.op": OP.GRPC_CLIENT,
9493
"sentry.origin": SPAN_ORIGIN,
94+
SPANDATA.RPC_METHOD: method,
9595
},
9696
) as span:
97-
span.set_attribute(SPANDATA.RPC_METHOD, method)
98-
9997
client_call_details = (
10098
self._update_client_call_details_metadata_from_scope(
10199
client_call_details

0 commit comments

Comments
 (0)