There was an error while loading. Please reload this page.
1 parent 4589697 commit 08e74c3Copy full SHA for 08e74c3
1 file changed
src/logger/instrumentation.ts
@@ -62,15 +62,19 @@ function patchConsole(): void {
62
.map(stripAnsiCodes)
63
.join(' ');
64
65
- circularBuffer.addLog({
66
- timestamp: new Date().toISOString(),
67
- severityText: severity,
68
- body,
69
- attributes: {
70
- 'log.origin': 'console',
71
- 'log.method': method,
72
- },
73
- });
+ const isAllWhitespace = body.match(/^\s+$/);
+
+ if (!isAllWhitespace) {
+ circularBuffer.addLog({
+ timestamp: new Date().toISOString(),
+ severityText: severity,
+ body,
+ attributes: {
+ 'log.origin': 'console',
74
+ 'log.method': method,
75
+ },
76
+ });
77
+ }
78
} catch {
79
// Silently fail to avoid breaking console
80
}
0 commit comments