@@ -9,8 +9,8 @@ class Scope
99 include ArgumentCheckingHelper
1010
1111 ATTRIBUTES = [
12- :transaction_names ,
13- :transaction_sources ,
12+ :transaction_name ,
13+ :transaction_source ,
1414 :contexts ,
1515 :extra ,
1616 :tags ,
@@ -96,8 +96,8 @@ def dup
9696 copy . extra = extra . deep_dup
9797 copy . tags = tags . deep_dup
9898 copy . user = user . deep_dup
99- copy . transaction_names = transaction_names . dup
100- copy . transaction_sources = transaction_sources . dup
99+ copy . transaction_name = transaction_name . dup
100+ copy . transaction_source = transaction_source . dup
101101 copy . fingerprint = fingerprint . deep_dup
102102 copy . span = span . deep_dup
103103 copy . session = session . deep_dup
@@ -114,8 +114,8 @@ def update_from_scope(scope)
114114 self . extra = scope . extra
115115 self . tags = scope . tags
116116 self . user = scope . user
117- self . transaction_names = scope . transaction_names
118- self . transaction_sources = scope . transaction_sources
117+ self . transaction_name = scope . transaction_name
118+ self . transaction_source = scope . transaction_source
119119 self . fingerprint = scope . fingerprint
120120 self . span = scope . span
121121 self . propagation_context = scope . propagation_context
@@ -231,8 +231,8 @@ def set_level(level)
231231 # @param transaction_name [String]
232232 # @return [void]
233233 def set_transaction_name ( transaction_name , source : :custom )
234- @transaction_names << transaction_name
235- @transaction_sources << source
234+ @transaction_name = transaction_name
235+ @transaction_source = source
236236 end
237237
238238 # Sets the currently active session on the scope.
@@ -242,20 +242,6 @@ def set_session(session)
242242 @session = session
243243 end
244244
245- # Returns current transaction name.
246- # The "transaction" here does not refer to `Transaction` objects.
247- # @return [String, nil]
248- def transaction_name
249- @transaction_names . last
250- end
251-
252- # Returns current transaction source.
253- # The "transaction" here does not refer to `Transaction` objects.
254- # @return [String, nil]
255- def transaction_source
256- @transaction_sources . last
257- end
258-
259245 # These are high cardinality and thus bad.
260246 # @return [Boolean]
261247 def transaction_source_low_quality?
@@ -311,8 +297,8 @@ def set_default_value
311297 @user = { }
312298 @level = :error
313299 @fingerprint = [ ]
314- @transaction_names = [ ]
315- @transaction_sources = [ ]
300+ @transaction_name = nil
301+ @transaction_source = nil
316302 @event_processors = [ ]
317303 @rack_env = { }
318304 @span = nil
0 commit comments