fix: include server script in recorder stack trace (#21891)

[skip ci]
This commit is contained in:
Ankush Menat 2023-08-01 20:59:46 +05:30 committed by GitHub
parent 2c92043998
commit 8bf8950c2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,7 @@ def get_current_stack_frames():
current = inspect.currentframe()
frames = inspect.getouterframes(current, context=10)
for frame, filename, lineno, function, context, index in list(reversed(frames))[:-2]:
if "/apps/" in filename:
if "/apps/" in filename or "<serverscript>" in filename:
yield {
"filename": TRACEBACK_PATH_PATTERN.sub("", filename),
"lineno": lineno,