@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/README.md +15 -1
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/preload.cjs +12 -2
- package/dist/preload.cjs.map +1 -1
- package/dist/preload.js +12 -2
- package/dist/preload.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ libraries including OpenAI, Anthropic, Vercel AI SDK, and more.
|
|
|
20
20
|
- [Session Tracking](#session-tracking)
|
|
21
21
|
- [Custom Events & Logging](#custom-events--logging)
|
|
22
22
|
- [Environment Variables](#environment-variables)
|
|
23
|
+
- [Disable Span Export](#disable-span-export)
|
|
23
24
|
- [Advanced Configuration](#advanced-configuration)
|
|
24
25
|
- [Testing & Development](#testing--development)
|
|
25
26
|
- [Package.json Examples](#packagejson-examples)
|
|
@@ -507,13 +508,26 @@ BRIZZ_BASE_URL=https://telemetry.brizz.dev # Default telemetry endpoint
|
|
|
507
508
|
BRIZZ_APP_NAME=my-app # Application name
|
|
508
509
|
BRIZZ_APP_VERSION=1.0.0 # Application version
|
|
509
510
|
BRIZZ_ENVIRONMENT=production # Environment (dev, staging, prod)
|
|
510
|
-
BRIZZ_LOG_LEVEL=info
|
|
511
|
+
BRIZZ_LOG_LEVEL=info # SDK log level
|
|
512
|
+
BRIZZ_DISABLE_SPAN_EXPORTER=true # Skip span export (see "Disable Span Export")
|
|
511
513
|
|
|
512
514
|
# OpenTelemetry Standard Variables
|
|
513
515
|
OTEL_SERVICE_NAME=my-service # Service name
|
|
514
516
|
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true # Capture AI content
|
|
515
517
|
```
|
|
516
518
|
|
|
519
|
+
## Disable Span Export
|
|
520
|
+
|
|
521
|
+
Keep `Brizz.initialize()` in your code without sending any spans — useful for dev/test
|
|
522
|
+
environments. When enabled, the SDK skips span exporter and processor setup, so no
|
|
523
|
+
spans are exported. Metrics and logs continue to work.
|
|
524
|
+
|
|
525
|
+
```typescript
|
|
526
|
+
Brizz.initialize({ apiKey: 'your-api-key', disableSpanExporter: true });
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Or via env var: `BRIZZ_DISABLE_SPAN_EXPORTER=true`.
|
|
530
|
+
|
|
517
531
|
## Advanced Configuration
|
|
518
532
|
|
|
519
533
|
```typescript
|
package/dist/index.cjs
CHANGED
|
@@ -331,6 +331,7 @@ function resolveConfig(options) {
|
|
|
331
331
|
headers: { ...options.headers },
|
|
332
332
|
apiKey: process.env["BRIZZ_API_KEY"] || options.apiKey,
|
|
333
333
|
disableBatch: process.env["BRIZZ_DISABLE_BATCH"] === "true" || !!options.disableBatch,
|
|
334
|
+
disableSpanExporter: process.env["BRIZZ_DISABLE_SPAN_EXPORTER"] === "true" || !!options.disableSpanExporter,
|
|
334
335
|
environment: process.env["BRIZZ_ENVIRONMENT"] || options.environment,
|
|
335
336
|
logLevel: resolvedLogLevel,
|
|
336
337
|
masking: resolvedMasking
|
|
@@ -496,7 +497,7 @@ var import_sdk_logs2 = require("@opentelemetry/sdk-logs");
|
|
|
496
497
|
|
|
497
498
|
// src/internal/version.ts
|
|
498
499
|
function getSDKVersion() {
|
|
499
|
-
return "0.1.
|
|
500
|
+
return "0.1.17";
|
|
500
501
|
}
|
|
501
502
|
|
|
502
503
|
// src/internal/log/processors/log-processor.ts
|
|
@@ -1643,6 +1644,15 @@ var TracingModule = class _TracingModule {
|
|
|
1643
1644
|
*/
|
|
1644
1645
|
setup(config) {
|
|
1645
1646
|
logger.info("Setting up tracing module");
|
|
1647
|
+
if (config.disableSpanExporter) {
|
|
1648
|
+
logger.info(
|
|
1649
|
+
"Span exporter disabled via disableSpanExporter; skipping exporter and processor setup"
|
|
1650
|
+
);
|
|
1651
|
+
this.spanExporter = null;
|
|
1652
|
+
this.spanProcessor = null;
|
|
1653
|
+
_TracingModule.instance = this;
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1646
1656
|
this.initSpanExporter(config);
|
|
1647
1657
|
this.initSpanProcessor(config);
|
|
1648
1658
|
_TracingModule.instance = this;
|
|
@@ -1989,7 +1999,7 @@ var _Brizz = class __Brizz {
|
|
|
1989
1999
|
resourceAttributes["deployment.environment"] = resolvedConfig.environment;
|
|
1990
2000
|
}
|
|
1991
2001
|
this._sdk = new import_sdk_node.NodeSDK({
|
|
1992
|
-
spanProcessors: [getSpanProcessor()],
|
|
2002
|
+
spanProcessors: resolvedConfig.disableSpanExporter ? [] : [getSpanProcessor()],
|
|
1993
2003
|
metricReader: getMetricsReader(),
|
|
1994
2004
|
resource: (0, import_resources3.resourceFromAttributes)(resourceAttributes),
|
|
1995
2005
|
instrumentations: manualInstrumentations
|