File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
integrations/opentelemetry Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,4 @@ class SentrySpanAttribute:
3030 NAME = "sentry.name"
3131 SOURCE = "sentry.source"
3232 CONTEXT = "sentry.context"
33+ CUSTOM_SAMPLED = "sentry.custom_sampled"
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ def should_sample(
132132 sampling_context = {
133133 "transaction_context" : {
134134 "name" : name ,
135- "op" : attributes .get ("op" ),
135+ "op" : attributes .get (SentrySpanAttribute . OP ),
136136 },
137137 "parent_sampled" : get_parent_sampled (parent_span_context , trace_id ),
138138 }
Original file line number Diff line number Diff line change @@ -1235,7 +1235,6 @@ def __init__(
12351235
12361236 # Prepopulate some attrs to be accessible in traces_sampler
12371237 attributes = attributes or {}
1238- attributes [SentrySpanAttribute .NAME ] = span_name
12391238 attributes [SentrySpanAttribute .OP ] = op
12401239 if sampled is not None :
12411240 attributes [SentrySpanAttribute .CUSTOM_SAMPLED ] = sampled
@@ -1244,6 +1243,7 @@ def __init__(
12441243 span_name , start_time = start_timestamp , attributes = attributes
12451244 )
12461245
1246+ self .name = name
12471247 self .origin = origin or DEFAULT_SPAN_ORIGIN
12481248 self .description = description
12491249 self .source = source
You can’t perform that action at this time.
0 commit comments