Skip to content

Commit 51e600f

Browse files
committed
feat(scope): Emit buffer_overflow discard reason when popping breadcrumbs
1 parent 968b362 commit 51e600f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

sentry_sdk/_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ class SDKInfo(TypedDict):
159159
"metric_bucket",
160160
"monitor",
161161
"span",
162+
"log_item",
162163
]
163164
SessionStatus = Literal["ok", "exited", "crashed", "abnormal"]
164165

sentry_sdk/scope.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ def add_breadcrumb(self, crumb=None, hint=None, **kwargs):
972972
logger.info("before breadcrumb dropped breadcrumb (%s)", crumb)
973973

974974
while len(self._breadcrumbs) > max_breadcrumbs:
975+
client.transport.record_lost_event("buffer_overflow", "log_item")
975976
self._breadcrumbs.popleft()
976977

977978
def start_transaction(

0 commit comments

Comments
 (0)