@echoteam/signoz-react 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +19 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15606,9 +15606,15 @@ function addErrorTracking(enableConsoleLog = false) {
|
|
|
15606
15606
|
window.addEventListener('unhandledrejection', (event) => {
|
|
15607
15607
|
// Suppress BatchSpanProcessor timeout errors to avoid noise
|
|
15608
15608
|
const reason = String(event.reason);
|
|
15609
|
-
|
|
15609
|
+
const stack = event.reason instanceof Error ? (event.reason.stack || '') : '';
|
|
15610
|
+
// Check if this is a SignOz internal timeout error
|
|
15611
|
+
const isSignOzTimeout = (reason.includes('Timeout') &&
|
|
15612
|
+
(reason.includes('BatchSpanProcessor') ||
|
|
15613
|
+
stack.includes('BatchSpanProcessor') ||
|
|
15614
|
+
stack.includes('zone.js')));
|
|
15615
|
+
if (isSignOzTimeout) {
|
|
15610
15616
|
if (enableConsoleLog) {
|
|
15611
|
-
console.warn('[SignOz] Span export timeout (this is usually safe to ignore)
|
|
15617
|
+
console.warn('[SignOz] Span export timeout (this is usually safe to ignore - check if SignOz endpoint is reachable)');
|
|
15612
15618
|
}
|
|
15613
15619
|
event.preventDefault(); // Prevent the error from being logged
|
|
15614
15620
|
return;
|
|
@@ -15640,6 +15646,17 @@ function addErrorTracking(enableConsoleLog = false) {
|
|
|
15640
15646
|
const originalHandleError = currentZone.handleError;
|
|
15641
15647
|
if (originalHandleError) {
|
|
15642
15648
|
currentZone.handleError = function (error) {
|
|
15649
|
+
// Skip SignOz internal timeout errors
|
|
15650
|
+
const errorMessage = error.message || String(error);
|
|
15651
|
+
const errorStack = error.stack || '';
|
|
15652
|
+
const isSignOzTimeout = (errorMessage.includes('Timeout') &&
|
|
15653
|
+
(errorStack.includes('BatchSpanProcessor') || errorStack.includes('zone.js')));
|
|
15654
|
+
if (isSignOzTimeout) {
|
|
15655
|
+
if (enableConsoleLog) {
|
|
15656
|
+
console.warn('[SignOz] Zone.js caught span export timeout (safe to ignore)');
|
|
15657
|
+
}
|
|
15658
|
+
return; // Don't track this error
|
|
15659
|
+
}
|
|
15643
15660
|
const tracer = trace.getTracer('error-tracker');
|
|
15644
15661
|
const span = tracer.startSpan('Zone.js Error');
|
|
15645
15662
|
span.setAttribute('error.type', 'zone_error');
|