unnbound-logger-sdk 3.0.14 → 3.0.15
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/storage.d.ts +1 -0
- package/dist/trace.d.ts +1 -0
- package/dist/trace.js +3 -1
- package/package.json +1 -1
package/dist/storage.d.ts
CHANGED
package/dist/trace.d.ts
CHANGED
package/dist/trace.js
CHANGED
|
@@ -16,6 +16,8 @@ exports.getTraceId = getTraceId;
|
|
|
16
16
|
* @returns The result of the callback
|
|
17
17
|
*/
|
|
18
18
|
const withTrace = (callback, extra) => {
|
|
19
|
-
|
|
19
|
+
const previous = storage_1.storage.getStore();
|
|
20
|
+
const traceId = extra?.traceId ?? previous?.traceId ?? (0, exports.getTraceId)();
|
|
21
|
+
return storage_1.storage.run({ ...previous, ...extra, traceId }, callback);
|
|
20
22
|
};
|
|
21
23
|
exports.withTrace = withTrace;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unnbound-logger-sdk",
|
|
3
3
|
"description": "A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.15",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|