Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/core/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ export class Scope {
this._breadcrumbs.push(mergedBreadcrumb);
if (this._breadcrumbs.length > maxCrumbs) {
this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);
this._client?.recordDroppedEvent('buffer_overflow', 'log_item');
}

this._notifyScopeListeners();
Expand Down
16 changes: 0 additions & 16 deletions packages/core/test/lib/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,22 +357,6 @@ describe('Client', () => {
expect(isolationScopeBreadcrumbs).toEqual([{ message: 'hello3', timestamp: expect.any(Number) }]);
});

test('it records `buffer_overflow` client discard reason when buffer overflows', () => {
Comment thread
Lms24 marked this conversation as resolved.
const options = getDefaultTestClientOptions({ maxBreadcrumbs: 1 });
const client = new TestClient(options);
const recordLostEventSpy = vi.spyOn(client, 'recordDroppedEvent');
setCurrentClient(client);
getIsolationScope().setClient(client);
client.init();

addBreadcrumb({ message: 'hello1' });
addBreadcrumb({ message: 'hello2' });
addBreadcrumb({ message: 'hello3' });

expect(recordLostEventSpy).toHaveBeenCalledTimes(2);
expect(recordLostEventSpy).toHaveBeenLastCalledWith('buffer_overflow', 'log_item');
});

test('calls `beforeBreadcrumb` and adds the breadcrumb without any changes', () => {
const beforeBreadcrumb = vi.fn(breadcrumb => breadcrumb);
const options = getDefaultTestClientOptions({ beforeBreadcrumb });
Expand Down
Loading