@echoteam/signoz-react 1.0.6 → 1.0.7-beta.0

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 CHANGED
@@ -15263,13 +15263,17 @@ function getConfigValue(key) {
15263
15263
  }
15264
15264
  // Fungsi untuk memvalidasi konfigurasi
15265
15265
  function validateConfig(config) {
15266
- const requiredFields = ['serviceName', 'serviceVersion', 'environment', 'serviceNamespace', 'url'];
15266
+ const requiredFields = ['serviceName', 'serviceVersion', 'environment', 'serviceNamespace', 'url', 'allowedOrigins'];
15267
15267
  const missingFields = [];
15268
15268
  for (const field of requiredFields) {
15269
15269
  if (!config[field]) {
15270
15270
  missingFields.push(field);
15271
15271
  }
15272
15272
  }
15273
+ // Khusus validasi allowedOrigins: pastikan array tidak kosong
15274
+ if (config.allowedOrigins && config.allowedOrigins.length === 0) {
15275
+ missingFields.push('allowedOrigins tidak boleh kosong demi keamanan CORS');
15276
+ }
15273
15277
  return {
15274
15278
  isValid: missingFields.length === 0,
15275
15279
  missingFields
@@ -15364,10 +15368,22 @@ function initializeSignOzTracing(config) {
15364
15368
  }),
15365
15369
  ],
15366
15370
  });
15367
- console.log('SignOz tracing berhasil diinisialisasi');
15371
+ console.log('SignOz: Konfigurasi tracing:', {
15372
+ serviceName: effectiveConfig.serviceName,
15373
+ environment: effectiveConfig.environment,
15374
+ allowedOrigins: effectiveConfig.allowedOrigins,
15375
+ traceSampleRate: effectiveConfig.traceSampleRate
15376
+ });
15377
+ console.log('SignOz: Tracing berhasil diinisialisasi');
15368
15378
  }
15369
- catch (error) {
15379
+ catch (e) {
15380
+ const error = e;
15370
15381
  console.error('SignOz: Gagal menginisialisasi tracing:', error);
15382
+ console.error('SignOz: Detail error:', {
15383
+ name: error.name,
15384
+ message: error.message,
15385
+ stack: error.stack
15386
+ });
15371
15387
  }
15372
15388
  }
15373
15389