@autofleet/outbreak 2.0.1 → 2.1.0
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/config.d.ts +3 -5
- package/dist/config.js +2 -7
- package/dist/config.js.map +1 -1
- package/dist/http_wrapper.d.ts +3 -2
- package/dist/http_wrapper.js +59 -64
- package/dist/http_wrapper.js.map +1 -1
- package/dist/index.d.ts +5 -7
- package/dist/index.js +7 -28
- package/dist/index.js.map +1 -1
- package/dist/tracer.d.ts +9 -13
- package/dist/tracer.js +69 -52
- package/dist/tracer.js.map +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
interface Overrides {
|
1
|
+
export interface Overrides {
|
2
2
|
setAndPropagateCorrelationId?: boolean;
|
3
|
-
propagateInResponses?: boolean;
|
4
3
|
headersToPropagate?: string[];
|
5
4
|
headersPrefix?: string;
|
6
5
|
}
|
7
|
-
export interface LoadedConfig extends Required<Pick<Overrides, 'setAndPropagateCorrelationId' | '
|
6
|
+
export interface LoadedConfig extends Required<Pick<Overrides, 'setAndPropagateCorrelationId' | 'headersPrefix'>> {
|
8
7
|
correlationIdHeader: string;
|
9
|
-
headersToCollect: string
|
10
|
-
headersToInject: string[];
|
8
|
+
headersToCollect: Set<string>;
|
11
9
|
}
|
12
10
|
declare const _default: {
|
13
11
|
load: (overrides?: Overrides) => LoadedConfig;
|
package/dist/config.js
CHANGED
@@ -13,20 +13,15 @@ const validateHeaderList = (headers) => {
|
|
13
13
|
}
|
14
14
|
};
|
15
15
|
const load = (overrides = {}) => {
|
16
|
-
const { setAndPropagateCorrelationId = true,
|
16
|
+
const { setAndPropagateCorrelationId = true, headersToPropagate = [
|
17
17
|
'x-request-id',
|
18
18
|
'x-variant-id',
|
19
19
|
], headersPrefix = 'x-af-', } = overrides;
|
20
20
|
validateHeaderList(headersToPropagate);
|
21
|
-
const headersToInject = setAndPropagateCorrelationId === true
|
22
|
-
? [correlationIdHeader, ...headersToPropagate]
|
23
|
-
: headersToPropagate;
|
24
21
|
return {
|
25
22
|
setAndPropagateCorrelationId,
|
26
|
-
propagateInResponses,
|
27
23
|
correlationIdHeader,
|
28
|
-
headersToCollect: headersToPropagate,
|
29
|
-
headersToInject,
|
24
|
+
headersToCollect: new Set(headersToPropagate),
|
30
25
|
headersPrefix,
|
31
26
|
};
|
32
27
|
};
|
package/dist/config.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAAA,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEzC,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAQ,EAAE;IACrD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,iEAAiE;IACjE,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAE1C,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhG,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,yCAAyC,cAAc,EAAE,CAAC,CAAC;KAC5E;AACH,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;AAAA,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEzC,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAQ,EAAE;IACrD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,iEAAiE;IACjE,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAE1C,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhG,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,yCAAyC,cAAc,EAAE,CAAC,CAAC;KAC5E;AACH,CAAC,CAAC;AAaF,MAAM,IAAI,GAAG,CAAC,YAAuB,EAAE,EAAgB,EAAE;IACvD,MAAM,EACJ,4BAA4B,GAAG,IAAI,EACnC,kBAAkB,GAAG;QACnB,cAAc;QACd,cAAc;KACf,EACD,aAAa,GAAG,OAAO,GACxB,GAAG,SAAS,CAAC;IAEd,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IAEvC,OAAO;QACL,4BAA4B;QAC5B,mBAAmB;QACnB,gBAAgB,EAAE,IAAI,GAAG,CAAC,kBAAkB,CAAC;QAC7C,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe;IACb,IAAI;IACJ,mBAAmB;CACpB,CAAC"}
|
package/dist/http_wrapper.d.ts
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import type { Tracer } from './tracer';
|
2
|
+
import type { LoadedConfig } from './config';
|
3
|
+
export default function wrapHttp(config: LoadedConfig, tracer: Tracer): void;
|
package/dist/http_wrapper.js
CHANGED
@@ -1,99 +1,66 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
4
|
};
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
6
|
const node_http_1 = __importDefault(require("node:http"));
|
30
7
|
const node_crypto_1 = require("node:crypto");
|
31
|
-
const tracer_1 = __importStar(require("./tracer"));
|
32
8
|
const const_1 = require("./const");
|
33
9
|
const generateShortId = () => (0, node_crypto_1.randomUUID)().split('-')[0];
|
10
|
+
const isFetchRequest = (headers) => headers instanceof Request || Object.prototype.toString.call(headers) === '[object Request]';
|
11
|
+
const isFetchHeaders = (headers) => headers instanceof Headers || Object.prototype.toString.call(headers) === '[object Headers]';
|
34
12
|
const originalHttpCreateServer = node_http_1.default.createServer;
|
35
13
|
const originalRequest = node_http_1.default.request;
|
36
14
|
const originalGet = node_http_1.default.get;
|
37
|
-
|
15
|
+
const originalFetch = globalThis.fetch;
|
16
|
+
function setAndCollectCorrelationId(config, tracer, req, res) {
|
38
17
|
const correlationId = req.headers[config.correlationIdHeader] ?? generateShortId();
|
39
|
-
|
18
|
+
tracer.getCurrentTrace().context.set(config.correlationIdHeader, correlationId);
|
40
19
|
res.setHeader(config.correlationIdHeader, correlationId);
|
41
20
|
}
|
42
|
-
function collect(
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
21
|
+
function collect(config, tracer, req, res) {
|
22
|
+
if (config.setAndPropagateCorrelationId) {
|
23
|
+
setAndCollectCorrelationId(config, tracer, req, res);
|
24
|
+
}
|
25
|
+
Object.entries(req.headers).forEach(([headerName, value]) => {
|
26
|
+
const shouldCollect = config.headersToCollect.has(headerName) || headerName.startsWith(config.headersPrefix);
|
27
|
+
if (shouldCollect && typeof value !== 'undefined') {
|
28
|
+
tracer.getCurrentTrace().context.set(headerName, value);
|
49
29
|
}
|
50
30
|
});
|
51
31
|
}
|
52
|
-
function
|
53
|
-
if (tracer_1.default.currentTrace) {
|
54
|
-
headers.forEach((header) => {
|
55
|
-
response.setHeader(header, tracer_1.default.currentTrace.context.get(header));
|
56
|
-
});
|
57
|
-
}
|
58
|
-
}
|
59
|
-
function wrappedListener(config, listener) {
|
32
|
+
function wrappedListener(config, tracer, listener) {
|
60
33
|
// @ts-expect-error we add next and error which don't exist on the original type
|
61
34
|
return (req, res, next, error) => {
|
62
|
-
|
63
|
-
|
64
|
-
setAndCollectCorrelationId(config, req, res);
|
65
|
-
}
|
66
|
-
collect(req, config.headersToCollect, config.headersPrefix);
|
67
|
-
if (config.propagateInResponses) {
|
68
|
-
injectInResponse(res, [config.correlationIdHeader]);
|
69
|
-
}
|
35
|
+
tracer.newTrace(const_1.traceTypes.HTTP_REQUEST);
|
36
|
+
collect(config, tracer, req, res);
|
70
37
|
// @ts-expect-error we add next and error which don't exist on the original type
|
71
38
|
listener(req, res, next, error);
|
72
39
|
};
|
73
40
|
}
|
74
|
-
function wrapHttpCreateServer(config) {
|
41
|
+
function wrapHttpCreateServer(config, tracer) {
|
75
42
|
function wrappedHttpCreateServer(options, listener) {
|
76
43
|
listener = listener || options;
|
77
|
-
return originalHttpCreateServer(wrappedListener(config, listener));
|
44
|
+
return originalHttpCreateServer(wrappedListener(config, tracer, listener));
|
78
45
|
}
|
79
46
|
return wrappedHttpCreateServer;
|
80
47
|
}
|
81
|
-
function inject(options) {
|
82
|
-
|
48
|
+
function inject(tracer, options) {
|
49
|
+
const currentTraceContext = tracer.getCurrentTrace().context;
|
50
|
+
if (currentTraceContext) {
|
83
51
|
options.headers || (options.headers = {});
|
84
|
-
[...(
|
85
|
-
options.headers[header] =
|
52
|
+
[...(currentTraceContext.keys())].forEach((header) => {
|
53
|
+
options.headers[header] = currentTraceContext.get(header);
|
86
54
|
});
|
87
55
|
}
|
88
56
|
}
|
89
|
-
function wrapHttpRequest(originalMethod) {
|
90
|
-
// Return type
|
57
|
+
function wrapHttpRequest(tracer, originalMethod) {
|
91
58
|
function urlFirst(url, options, cb) {
|
92
|
-
inject(options);
|
59
|
+
inject(tracer, options);
|
93
60
|
return originalMethod(url, options, cb);
|
94
61
|
}
|
95
62
|
function optionsFirst(options, cb) {
|
96
|
-
inject(options);
|
63
|
+
inject(tracer, options);
|
97
64
|
return originalMethod(options, cb);
|
98
65
|
}
|
99
66
|
function wrappedHttpRequest(...args) {
|
@@ -101,7 +68,7 @@ function wrapHttpRequest(originalMethod) {
|
|
101
68
|
let url;
|
102
69
|
let callback;
|
103
70
|
if (args.length === 3) {
|
104
|
-
[
|
71
|
+
[url, options, callback] = args;
|
105
72
|
return urlFirst(url, options, callback);
|
106
73
|
}
|
107
74
|
[options, callback] = args;
|
@@ -109,10 +76,38 @@ function wrapHttpRequest(originalMethod) {
|
|
109
76
|
}
|
110
77
|
return wrappedHttpRequest;
|
111
78
|
}
|
112
|
-
function
|
113
|
-
|
114
|
-
|
115
|
-
|
79
|
+
function injectInFetchRequest(tracer, headers) {
|
80
|
+
const currentTraceContext = tracer.getCurrentTrace()?.context;
|
81
|
+
/* c8 ignore next 3 */
|
82
|
+
if (!currentTraceContext) {
|
83
|
+
return;
|
84
|
+
}
|
85
|
+
// eslint-disable-next-line no-restricted-syntax
|
86
|
+
for (const header of currentTraceContext.keys()) {
|
87
|
+
headers.set(header, currentTraceContext.get(header));
|
88
|
+
}
|
89
|
+
}
|
90
|
+
function wrapFetch(tracer) {
|
91
|
+
globalThis.fetch = (input, init) => {
|
92
|
+
if (isFetchRequest(input) && input.headers && !init?.headers) {
|
93
|
+
injectInFetchRequest(tracer, input.headers);
|
94
|
+
}
|
95
|
+
else {
|
96
|
+
init ?? (init = {});
|
97
|
+
init.headers ?? (init.headers = new Headers());
|
98
|
+
if (!isFetchHeaders(init.headers)) {
|
99
|
+
init.headers = new Headers(init.headers);
|
100
|
+
}
|
101
|
+
injectInFetchRequest(tracer, init.headers);
|
102
|
+
}
|
103
|
+
return originalFetch(input, init);
|
104
|
+
};
|
105
|
+
}
|
106
|
+
function wrapHttp(config, tracer) {
|
107
|
+
node_http_1.default.createServer = wrapHttpCreateServer(config, tracer);
|
108
|
+
node_http_1.default.request = wrapHttpRequest(tracer, originalRequest);
|
109
|
+
node_http_1.default.get = wrapHttpRequest(tracer, originalGet);
|
110
|
+
wrapFetch(tracer);
|
116
111
|
}
|
117
112
|
exports.default = wrapHttp;
|
118
113
|
//# sourceMappingURL=http_wrapper.js.map
|
package/dist/http_wrapper.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"http_wrapper.js","sourceRoot":"","sources":["../src/http_wrapper.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"http_wrapper.js","sourceRoot":"","sources":["../src/http_wrapper.ts"],"names":[],"mappings":";;;;;AAAA,0DAA6B;AAC7B,6CAAyC;AAEzC,mCAAqC;AAIrC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAA,wBAAU,GAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzD,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAsB,EAAE,CAAC,OAAO,YAAY,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,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AmB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;KACtD;AACH,CAAC;AAED,SAAS,SAAS,CAAC,MAAc;IAC/B,UAAU,CAAC,KAAK,GAAG,CAAC,KAA6B,EAAE,IAAkB,EAAqB,EAAE;QAC1F,IAAI,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE;YAC5D,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;SAC7C;aAAM;YACL,IAAI,KAAJ,IAAI,GAAK,EAAE,EAAC;YACZ,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,OAAO,EAAE,EAAC;YAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACjC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aAC1C;YACD,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SAC5C;QACD,OAAO,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC;AAED,SAAwB,QAAQ,CAAC,MAAoB,EAAE,MAAc;IACnE,mBAAI,CAAC,YAAY,GAAG,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,mBAAI,CAAC,OAAO,GAAG,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACxD,mBAAI,CAAC,GAAG,GAAG,eAAe,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChD,SAAS,CAAC,MAAM,CAAC,CAAC;AACpB,CAAC;AALD,2BAKC"}
|
package/dist/index.d.ts
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
import winston from 'winston';
|
2
|
-
import
|
2
|
+
import { type Overrides } from './config';
|
3
|
+
import { type Trace } from './tracer';
|
3
4
|
export { traceTypes } from './const';
|
4
|
-
interface Options {
|
5
|
+
interface Options extends Overrides {
|
5
6
|
winstonLogger?: winston.Logger;
|
6
7
|
loggerTraceKey?: string;
|
7
|
-
headersPrefix?: string;
|
8
|
-
setAndPropagateCorrelationId?: boolean;
|
9
|
-
headersToPropagate?: string[];
|
10
8
|
}
|
11
9
|
export default function outbreakInitialize(options: Options): void;
|
12
|
-
export declare const getCurrentContext: () =>
|
13
|
-
export declare const newTrace: (type: import("./const").TraceType) =>
|
10
|
+
export declare const getCurrentContext: () => Trace | Record<string, never>;
|
11
|
+
export declare const newTrace: (type: import("./const").TraceType) => Trace;
|
package/dist/index.js
CHANGED
@@ -1,27 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
4
|
};
|
@@ -30,19 +7,20 @@ exports.newTrace = exports.getCurrentContext = exports.traceTypes = void 0;
|
|
30
7
|
const winston_1 = require("winston");
|
31
8
|
const http_wrapper_1 = __importDefault(require("./http_wrapper"));
|
32
9
|
const config_1 = __importDefault(require("./config"));
|
33
|
-
const
|
10
|
+
const tracer_1 = require("./tracer");
|
34
11
|
var const_1 = require("./const");
|
35
12
|
Object.defineProperty(exports, "traceTypes", { enumerable: true, get: function () { return const_1.traceTypes; } });
|
13
|
+
const tracer = new tracer_1.Tracer();
|
36
14
|
const addMetadataToLog = (loggerTraceKey) => (0, winston_1.format)((info) => {
|
37
|
-
const
|
38
|
-
if (
|
15
|
+
const currentTraceContext = tracer.getCurrentTrace()?.context;
|
16
|
+
if (currentTraceContext) {
|
39
17
|
// eslint-disable-next-line no-param-reassign
|
40
|
-
info[loggerTraceKey] =
|
18
|
+
info[loggerTraceKey] = currentTraceContext.get(config_1.default.correlationIdHeader);
|
41
19
|
}
|
42
20
|
return info;
|
43
21
|
});
|
44
22
|
function outbreakInitialize(options) {
|
45
|
-
(0, http_wrapper_1.default)(config_1.default.load(options));
|
23
|
+
(0, http_wrapper_1.default)(config_1.default.load(options), tracer);
|
46
24
|
tracer.enable();
|
47
25
|
if (options.winstonLogger) {
|
48
26
|
const traceKey = options.loggerTraceKey || 'traceId';
|
@@ -54,6 +32,7 @@ function outbreakInitialize(options) {
|
|
54
32
|
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
55
33
|
const bluebird = require('bluebird');
|
56
34
|
bluebird.config({ asyncHooks: true });
|
35
|
+
/* c8 ignore next */
|
57
36
|
}
|
58
37
|
catch (e) { /* ignore */ }
|
59
38
|
}
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","s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;AApBD,qCAoBC;AAEM,MAAM,iBAAiB,GAAG,GAAkC,EAAE,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;AAAlF,QAAA,iBAAiB,qBAAiE;AAEhF,gBAAQ,GAAK,MAAM,UAAC"}
|
package/dist/tracer.d.ts
CHANGED
@@ -1,18 +1,14 @@
|
|
1
1
|
import asyncHooks from 'node:async_hooks';
|
2
2
|
import type { TraceType } from './const';
|
3
|
-
|
4
|
-
|
5
|
-
traces: Record<number, Trace>;
|
6
|
-
}
|
7
|
-
declare const tracer: Tracer;
|
8
|
-
declare class Trace {
|
9
|
-
type: string;
|
3
|
+
export declare class Trace {
|
4
|
+
type: TraceType;
|
10
5
|
readonly id: `${string}-${string}-${string}-${string}-${string}`;
|
11
6
|
readonly context: Map<string, string>;
|
12
|
-
constructor(type:
|
7
|
+
constructor(type: TraceType);
|
8
|
+
}
|
9
|
+
export declare class Tracer {
|
10
|
+
#private;
|
11
|
+
enable: () => asyncHooks.AsyncHook;
|
12
|
+
newTrace: (type: TraceType) => Trace;
|
13
|
+
getCurrentTrace: () => Trace | Record<string, never>;
|
13
14
|
}
|
14
|
-
export type { Trace };
|
15
|
-
export declare const enable: () => asyncHooks.AsyncHook;
|
16
|
-
export declare const newTrace: (type: TraceType) => Trace;
|
17
|
-
export declare const getCurrentTrace: () => Partial<Trace>;
|
18
|
-
export default tracer;
|
package/dist/tracer.js
CHANGED
@@ -1,43 +1,23 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
6
|
+
};
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
12
|
+
};
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
15
|
};
|
16
|
+
var _Tracer_isTraceEnabled, _Tracer_prevStates, _Tracer_tracer, _Tracer_hook;
|
5
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.
|
18
|
+
exports.Tracer = exports.Trace = void 0;
|
7
19
|
const node_async_hooks_1 = __importDefault(require("node:async_hooks"));
|
8
20
|
const node_crypto_1 = require("node:crypto");
|
9
|
-
const prevStates = {};
|
10
|
-
const tracer = {
|
11
|
-
currentTrace: null,
|
12
|
-
traces: {},
|
13
|
-
};
|
14
|
-
function init(asyncId, type, triggerAsyncId) {
|
15
|
-
if (tracer.traces[triggerAsyncId]) {
|
16
|
-
tracer.traces[asyncId] = tracer.traces[triggerAsyncId];
|
17
|
-
}
|
18
|
-
}
|
19
|
-
function before(asyncId) {
|
20
|
-
if (!tracer.traces[asyncId]) {
|
21
|
-
return;
|
22
|
-
}
|
23
|
-
prevStates[asyncId] = tracer.currentTrace;
|
24
|
-
tracer.currentTrace = tracer.traces[asyncId];
|
25
|
-
}
|
26
|
-
function after(asyncId) {
|
27
|
-
if (!tracer.traces[asyncId]) {
|
28
|
-
return;
|
29
|
-
}
|
30
|
-
tracer.currentTrace = prevStates[asyncId];
|
31
|
-
}
|
32
|
-
function destroy(asyncId) {
|
33
|
-
if (tracer.traces[asyncId]) {
|
34
|
-
delete tracer.traces[asyncId];
|
35
|
-
delete prevStates[asyncId];
|
36
|
-
}
|
37
|
-
}
|
38
|
-
const hook = node_async_hooks_1.default.createHook({
|
39
|
-
init, before, after, destroy,
|
40
|
-
});
|
41
21
|
class Trace {
|
42
22
|
constructor(type) {
|
43
23
|
this.type = type;
|
@@ -45,24 +25,61 @@ class Trace {
|
|
45
25
|
this.context = new Map();
|
46
26
|
}
|
47
27
|
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
28
|
+
exports.Trace = Trace;
|
29
|
+
class Tracer {
|
30
|
+
constructor() {
|
31
|
+
_Tracer_isTraceEnabled.set(this, false);
|
32
|
+
_Tracer_prevStates.set(this, new Map());
|
33
|
+
_Tracer_tracer.set(this, {
|
34
|
+
currentTrace: null,
|
35
|
+
traces: {},
|
36
|
+
});
|
37
|
+
_Tracer_hook.set(this, node_async_hooks_1.default.createHook({
|
38
|
+
init: (asyncId, _type, triggerAsyncId) => {
|
39
|
+
if (!__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[triggerAsyncId]) {
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId] = __classPrivateFieldGet(this, _Tracer_tracer, "f").traces[triggerAsyncId];
|
43
|
+
},
|
44
|
+
before: (asyncId) => {
|
45
|
+
if (!__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId]) {
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
__classPrivateFieldGet(this, _Tracer_prevStates, "f").set(asyncId, __classPrivateFieldGet(this, _Tracer_tracer, "f").currentTrace);
|
49
|
+
__classPrivateFieldGet(this, _Tracer_tracer, "f").currentTrace = __classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId];
|
50
|
+
},
|
51
|
+
after: (asyncId) => {
|
52
|
+
if (!__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId]) {
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
__classPrivateFieldGet(this, _Tracer_tracer, "f").currentTrace = __classPrivateFieldGet(this, _Tracer_prevStates, "f").get(asyncId);
|
56
|
+
},
|
57
|
+
destroy: (asyncId) => {
|
58
|
+
if (__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId]) {
|
59
|
+
delete __classPrivateFieldGet(this, _Tracer_tracer, "f").traces[asyncId];
|
60
|
+
__classPrivateFieldGet(this, _Tracer_prevStates, "f").delete(asyncId);
|
61
|
+
}
|
62
|
+
},
|
63
|
+
}));
|
64
|
+
this.enable = () => {
|
65
|
+
if (!__classPrivateFieldGet(this, _Tracer_isTraceEnabled, "f")) {
|
66
|
+
__classPrivateFieldGet(this, _Tracer_hook, "f").enable();
|
67
|
+
__classPrivateFieldSet(this, _Tracer_isTraceEnabled, true, "f");
|
68
|
+
}
|
69
|
+
return __classPrivateFieldGet(this, _Tracer_hook, "f");
|
70
|
+
};
|
71
|
+
this.newTrace = (type) => {
|
72
|
+
if (!__classPrivateFieldGet(this, _Tracer_isTraceEnabled, "f")) {
|
73
|
+
this.enable();
|
74
|
+
}
|
75
|
+
const currentTrace = new Trace(type);
|
76
|
+
__classPrivateFieldGet(this, _Tracer_tracer, "f").currentTrace = currentTrace;
|
77
|
+
__classPrivateFieldGet(this, _Tracer_tracer, "f").traces[node_async_hooks_1.default.executionAsyncId()] = currentTrace;
|
78
|
+
return currentTrace;
|
79
|
+
};
|
80
|
+
this.getCurrentTrace = () => __classPrivateFieldGet(this, _Tracer_tracer, "f").currentTrace || {};
|
52
81
|
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
};
|
57
|
-
exports.enable = enable;
|
58
|
-
const newTrace = (type) => {
|
59
|
-
(0, exports.enable)();
|
60
|
-
tracer.currentTrace = new Trace(type);
|
61
|
-
tracer.traces[node_async_hooks_1.default.executionAsyncId()] = tracer.currentTrace;
|
62
|
-
return tracer.currentTrace;
|
63
|
-
};
|
64
|
-
exports.newTrace = newTrace;
|
65
|
-
const getCurrentTrace = () => tracer.currentTrace || {};
|
66
|
-
exports.getCurrentTrace = getCurrentTrace;
|
67
|
-
exports.default = tracer;
|
82
|
+
}
|
83
|
+
exports.Tracer = Tracer;
|
84
|
+
_Tracer_isTraceEnabled = new WeakMap(), _Tracer_prevStates = new WeakMap(), _Tracer_tracer = new WeakMap(), _Tracer_hook = new WeakMap();
|
68
85
|
//# sourceMappingURL=tracer.js.map
|
package/dist/tracer.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../src/tracer.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../src/tracer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,wEAA0C;AAC1C,6CAAyC;AAQzC,MAAa,KAAK;IAKhB,YAAmB,IAAe;QAAf,SAAI,GAAJ,IAAI,CAAW;QAJlB,OAAE,GAAG,IAAA,wBAAU,GAAE,CAAC;QAElB,YAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEf,CAAC;CACvC;AAND,sBAMC;AAED,MAAa,MAAM;IAAnB;QACE,iCAAkB,KAAK,EAAC;QAExB,6BAAc,IAAI,GAAG,EAAiB,EAAC;QAEvC,yBAAuB;YACrB,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,EAAE;SACX,EAAC;QAEF,uBAAQ,0BAAU,CAAC,UAAU,CAAC;YAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;gBACvC,IAAI,CAAC,uBAAA,IAAI,sBAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;oBACxC,OAAO;iBACR;gBACD,uBAAA,IAAI,sBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,uBAAA,IAAI,sBAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YACrE,CAAC;YACD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;gBAClB,IAAI,CAAC,uBAAA,IAAI,sBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;oBACjC,OAAO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