@brizz/sdk 0.1.16 → 0.1.17

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/preload.js CHANGED
@@ -189,6 +189,7 @@ function resolveConfig(options) {
189
189
  headers: { ...options.headers },
190
190
  apiKey: process.env["BRIZZ_API_KEY"] || options.apiKey,
191
191
  disableBatch: process.env["BRIZZ_DISABLE_BATCH"] === "true" || !!options.disableBatch,
192
+ disableSpanExporter: process.env["BRIZZ_DISABLE_SPAN_EXPORTER"] === "true" || !!options.disableSpanExporter,
192
193
  environment: process.env["BRIZZ_ENVIRONMENT"] || options.environment,
193
194
  logLevel: resolvedLogLevel,
194
195
  masking: resolvedMasking
@@ -356,7 +357,7 @@ import {
356
357
 
357
358
  // src/internal/version.ts
358
359
  function getSDKVersion() {
359
- return "0.1.16";
360
+ return "0.1.17";
360
361
  }
361
362
 
362
363
  // src/internal/log/processors/log-processor.ts
@@ -1493,6 +1494,15 @@ var TracingModule = class _TracingModule {
1493
1494
  */
1494
1495
  setup(config) {
1495
1496
  logger.info("Setting up tracing module");
1497
+ if (config.disableSpanExporter) {
1498
+ logger.info(
1499
+ "Span exporter disabled via disableSpanExporter; skipping exporter and processor setup"
1500
+ );
1501
+ this.spanExporter = null;
1502
+ this.spanProcessor = null;
1503
+ _TracingModule.instance = this;
1504
+ return;
1505
+ }
1496
1506
  this.initSpanExporter(config);
1497
1507
  this.initSpanProcessor(config);
1498
1508
  _TracingModule.instance = this;
@@ -1658,7 +1668,7 @@ var _Brizz = class __Brizz {
1658
1668
  resourceAttributes["deployment.environment"] = resolvedConfig.environment;
1659
1669
  }
1660
1670
  this._sdk = new NodeSDK({
1661
- spanProcessors: [getSpanProcessor()],
1671
+ spanProcessors: resolvedConfig.disableSpanExporter ? [] : [getSpanProcessor()],
1662
1672
  metricReader: getMetricsReader(),
1663
1673
  resource: resourceFromAttributes3(resourceAttributes),
1664
1674
  instrumentations: manualInstrumentations