Skip to content

Commit 070653a

Browse files
authored
Expose set_transaction_name (#4634)
1 parent d71b953 commit 070653a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sentry_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"logger",
5050
"start_session",
5151
"end_session",
52+
"set_transaction_name",
5253
]
5354

5455
# Initialize the debug support after everything is loaded

sentry_sdk/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def overload(x):
8484
"monitor",
8585
"start_session",
8686
"end_session",
87+
"set_transaction_name",
8788
]
8889

8990

@@ -466,3 +467,9 @@ def start_session(
466467
def end_session():
467468
# type: () -> None
468469
return get_isolation_scope().end_session()
470+
471+
472+
@scopemethod
473+
def set_transaction_name(name, source=None):
474+
# type: (str, Optional[str]) -> None
475+
return get_current_scope().set_transaction_name(name, source)

0 commit comments

Comments
 (0)