@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.cjs CHANGED
@@ -206,6 +206,7 @@ function resolveConfig(options) {
206
206
  headers: { ...options.headers },
207
207
  apiKey: process.env["BRIZZ_API_KEY"] || options.apiKey,
208
208
  disableBatch: process.env["BRIZZ_DISABLE_BATCH"] === "true" || !!options.disableBatch,
209
+ disableSpanExporter: process.env["BRIZZ_DISABLE_SPAN_EXPORTER"] === "true" || !!options.disableSpanExporter,
209
210
  environment: process.env["BRIZZ_ENVIRONMENT"] || options.environment,
210
211
  logLevel: resolvedLogLevel,
211
212
  masking: resolvedMasking
@@ -371,7 +372,7 @@ var import_sdk_logs2 = require("@opentelemetry/sdk-logs");
371
372
 
372
373
  // src/internal/version.ts
373
374
  function getSDKVersion() {
374
- return "0.1.16";
375
+ return "0.1.17";
375
376
  }
376
377
 
377
378
  // src/internal/log/processors/log-processor.ts
@@ -1505,6 +1506,15 @@ var TracingModule = class _TracingModule {
1505
1506
  */
1506
1507
  setup(config) {
1507
1508
  logger.info("Setting up tracing module");
1509
+ if (config.disableSpanExporter) {
1510
+ logger.info(
1511
+ "Span exporter disabled via disableSpanExporter; skipping exporter and processor setup"
1512
+ );
1513
+ this.spanExporter = null;
1514
+ this.spanProcessor = null;
1515
+ _TracingModule.instance = this;
1516
+ return;
1517
+ }
1508
1518
  this.initSpanExporter(config);
1509
1519
  this.initSpanProcessor(config);
1510
1520
  _TracingModule.instance = this;
@@ -1670,7 +1680,7 @@ var _Brizz = class __Brizz {
1670
1680
  resourceAttributes["deployment.environment"] = resolvedConfig.environment;
1671
1681
  }
1672
1682
  this._sdk = new import_sdk_node.NodeSDK({
1673
- spanProcessors: [getSpanProcessor()],
1683
+ spanProcessors: resolvedConfig.disableSpanExporter ? [] : [getSpanProcessor()],
1674
1684
  metricReader: getMetricsReader(),
1675
1685
  resource: (0, import_resources3.resourceFromAttributes)(resourceAttributes),
1676
1686
  instrumentations: manualInstrumentations