@brizz/sdk 0.1.18 → 0.1.20
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 -2
- package/dist/index.cjs +37 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +37 -23
- package/dist/index.js.map +1 -1
- package/dist/preload.cjs +11 -13
- package/dist/preload.cjs.map +1 -1
- package/dist/preload.js +11 -13
- package/dist/preload.js.map +1 -1
- package/package.json +9 -4
package/dist/preload.cjs
CHANGED
|
@@ -373,7 +373,7 @@ var import_sdk_logs2 = require("@opentelemetry/sdk-logs");
|
|
|
373
373
|
|
|
374
374
|
// src/internal/version.ts
|
|
375
375
|
function getSDKVersion() {
|
|
376
|
-
return "0.1.
|
|
376
|
+
return "0.1.20";
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
// src/internal/log/processors/log-processor.ts
|
|
@@ -1439,6 +1439,14 @@ var BrizzSpanExporter = class {
|
|
|
1439
1439
|
// src/internal/trace/processors/span-processor.ts
|
|
1440
1440
|
var import_api4 = require("@opentelemetry/api");
|
|
1441
1441
|
var import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
1442
|
+
function applyContextAttributes(span) {
|
|
1443
|
+
const sessionProperties = import_api4.context.active().getValue(PROPERTIES_CONTEXT_KEY);
|
|
1444
|
+
if (sessionProperties) {
|
|
1445
|
+
for (const [key, value] of Object.entries(sessionProperties)) {
|
|
1446
|
+
span.setAttribute(`${BRIZZ}.${key}`, value);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1442
1450
|
var DEFAULT_MASKING_RULES = [
|
|
1443
1451
|
{
|
|
1444
1452
|
mode: "partial",
|
|
@@ -1473,12 +1481,7 @@ var BrizzSimpleSpanProcessor = class extends import_sdk_trace_base.SimpleSpanPro
|
|
|
1473
1481
|
if (maskingConfig) {
|
|
1474
1482
|
maskSpan(span, maskingConfig);
|
|
1475
1483
|
}
|
|
1476
|
-
|
|
1477
|
-
if (associationProperties) {
|
|
1478
|
-
for (const [key, value] of Object.entries(associationProperties)) {
|
|
1479
|
-
span.setAttribute(`${BRIZZ}.${key}`, value);
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1484
|
+
applyContextAttributes(span);
|
|
1482
1485
|
super.onStart(span, parentContext);
|
|
1483
1486
|
}
|
|
1484
1487
|
};
|
|
@@ -1493,12 +1496,7 @@ var BrizzBatchSpanProcessor = class extends import_sdk_trace_base.BatchSpanProce
|
|
|
1493
1496
|
if (maskingConfig) {
|
|
1494
1497
|
maskSpan(span, maskingConfig);
|
|
1495
1498
|
}
|
|
1496
|
-
|
|
1497
|
-
if (associationProperties) {
|
|
1498
|
-
for (const [key, value] of Object.entries(associationProperties)) {
|
|
1499
|
-
span.setAttribute(`${BRIZZ}.${key}`, value);
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1499
|
+
applyContextAttributes(span);
|
|
1502
1500
|
super.onStart(span, parentContext);
|
|
1503
1501
|
}
|
|
1504
1502
|
};
|