Skip to content

Commit 67ac714

Browse files
committed
Add more breadcrumbs for debugging live
1 parent 0bdecbe commit 67ac714

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import history from 'app/utils/history';
3333
import { Selection, TextOperation } from 'ot';
3434
import { json } from 'overmind';
3535

36+
import { logBreadcrumb } from '@codesandbox/common/lib/utils/analytics/sentry';
3637
import eventToTransform from '../../utils/event-to-transform';
3738
import { SERVER } from '../../utils/items';
3839
import * as internalActions from './internalActions';
@@ -361,6 +362,13 @@ export const codeChanged: Action<{
361362
if (state.live.isLive && module.code !== code) {
362363
let operation: TextOperation;
363364
if (event) {
365+
logBreadcrumb({
366+
category: 'ot',
367+
message: `Change Event ${JSON.stringify({
368+
moduleShortid: this.moduleShortid,
369+
event,
370+
})}`,
371+
});
364372
operation = eventToTransform(event, module.code).operation;
365373
} else {
366374
operation = getTextOperation(module.code, code);

packages/common/src/utils/analytics/sentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function initialize(dsn: string) {
5454
"undefined is not an object (evaluating 'window.__pad.performLoop')", // Only happens on Safari, but spams our servers. Doesn't break anything
5555
],
5656
whitelistUrls: [/https?:\/\/((uploads|www)\.)?codesandbox\.io/],
57-
maxBreadcrumbs: 90,
57+
maxBreadcrumbs: 100,
5858
/**
5959
* Don't send messages from the sandbox, so don't send from eg.
6060
* new.codesandbox.io or new.csb.app

0 commit comments

Comments
 (0)