File tree 1 file changed +8
-1
lines changed 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,10 @@ def transaction(self):
164
164
def transaction (self , value ):
165
165
# type: (Any) -> None
166
166
# would be type: (Optional[str]) -> None, see https://github.com/python/mypy/issues/3004
167
- """When set this forces a specific transaction name to be set."""
167
+ """When set this forces a specific transaction name to be set.
168
+
169
+ Deprecated: use set_transaction_name instead."""
170
+
168
171
# XXX: the docstring above is misleading. The implementation of
169
172
# apply_to_event prefers an existing value of event.transaction over
170
173
# anything set in the scope.
@@ -174,6 +177,10 @@ def transaction(self, value):
174
177
# Without breaking version compatibility, we could make the setter set a
175
178
# transaction name or transaction (self._span) depending on the type of
176
179
# the value argument.
180
+
181
+ logger .warning (
182
+ "Assigning to scope.transaction directly is deprecated: use scope.set_transaction_name() instead."
183
+ )
177
184
self ._transaction = value
178
185
if self ._span and self ._span .containing_transaction :
179
186
self ._span .containing_transaction .name = value
You can’t perform that action at this time.
0 commit comments