@echoteam/signoz-react 1.2.8 → 1.2.10

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.js CHANGED
@@ -15604,6 +15604,15 @@ function addErrorTracking(enableConsoleLog = false) {
15604
15604
  }, true); // Use capture phase to catch errors early
15605
15605
  // Track unhandled promise rejections
15606
15606
  window.addEventListener('unhandledrejection', (event) => {
15607
+ // Suppress BatchSpanProcessor timeout errors to avoid noise
15608
+ const reason = String(event.reason);
15609
+ if (reason.includes('Timeout') && reason.includes('BatchSpanProcessor')) {
15610
+ if (enableConsoleLog) {
15611
+ console.warn('[SignOz] Span export timeout (this is usually safe to ignore):', event.reason);
15612
+ }
15613
+ event.preventDefault(); // Prevent the error from being logged
15614
+ return;
15615
+ }
15607
15616
  const tracer = trace.getTracer('error-tracker');
15608
15617
  const span = tracer.startSpan('Unhandled Promise Rejection');
15609
15618
  span.setAttribute('error.type', 'unhandled_rejection');
@@ -16004,7 +16013,8 @@ function initializeSignOzTracing(config) {
16004
16013
  batchSpanProcessorConfig: (config === null || config === void 0 ? void 0 : config.batchSpanProcessorConfig) || {
16005
16014
  maxQueueSize: 100,
16006
16015
  scheduledDelayMillis: 5000,
16007
- exportTimeoutMillis: 30000
16016
+ exportTimeoutMillis: 60000, // Increased to 60 seconds
16017
+ maxExportBatchSize: 50 // Smaller batches to avoid timeouts
16008
16018
  },
16009
16019
  allowedOrigins: (config === null || config === void 0 ? void 0 : config.allowedOrigins) || parseAllowedOrigins(getConfigValue('REACT_APP_SIGNOZ_ALLOWED_ORIGINS')),
16010
16020
  enableRequestLogging: (config === null || config === void 0 ? void 0 : config.enableRequestLogging) !== undefined ? config.enableRequestLogging : (getConfigValue('REACT_APP_SIGNOZ_ENABLE_REQUEST_LOGGING') === 'true' || true),
@@ -16035,7 +16045,8 @@ function initializeSignOzTracing(config) {
16035
16045
  // Set up the OTLP trace exporter
16036
16046
  const exporter = new OTLPTraceExporter({
16037
16047
  url: effectiveConfig.url,
16038
- headers: effectiveConfig.headers
16048
+ headers: effectiveConfig.headers,
16049
+ timeoutMillis: 60000 // Set exporter timeout to 60 seconds
16039
16050
  });
16040
16051
  // Set up the span processor with configuration
16041
16052
  const processor = new BatchSpanProcessor(exporter, {