Skip to content

Commit 4d77e26

Browse files
committed
Expose set_transaction_name
1 parent d032604 commit 4d77e26

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

sentry_sdk/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"logger",
4848
"start_session",
4949
"end_session",
50+
"set_transaction_name",
5051
]
5152

5253
# Initialize the debug support after everything is loaded

sentry_sdk/api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"use_isolation_scope",
7575
"start_session",
7676
"end_session",
77+
"set_transaction_name",
7778
]
7879

7980

@@ -325,3 +326,8 @@ def start_session(
325326
@scopemethod
326327
def end_session() -> None:
327328
return get_isolation_scope().end_session()
329+
330+
331+
@scopemethod
332+
def set_transaction_name(name: str, source: Optional[str] = None) -> None:
333+
return get_current_scope().set_transaction_name(name, source)

0 commit comments

Comments
 (0)