@codefresh-io/cf-telemetry 1.0.3 → 2.0.0-alpha.10
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/global-config.d.ts +4 -0
- package/dist/global-config.js +8 -0
- package/dist/global-config.js.map +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +6 -12
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/init.d.mts +1 -0
- package/dist/init.mjs +5 -0
- package/dist/init.mjs.map +1 -0
- package/dist/{logger → logs}/config.d.ts +4 -0
- package/dist/{logger → logs}/config.js +2 -0
- package/dist/logs/config.js.map +1 -0
- package/dist/logs/index.d.ts +2 -0
- package/dist/logs/index.js +8 -0
- package/dist/logs/index.js.map +1 -0
- package/dist/logs/logger.d.ts +61 -0
- package/dist/logs/logger.js +97 -0
- package/dist/logs/logger.js.map +1 -0
- package/dist/logs/metadata-storage.d.ts +3 -0
- package/dist/logs/metadata-storage.js +6 -0
- package/dist/logs/metadata-storage.js.map +1 -0
- package/dist/logs/public.d.mts +1 -0
- package/dist/logs/public.d.ts +1 -0
- package/dist/logs/public.js +8 -0
- package/dist/logs/public.js.map +1 -0
- package/dist/logs/public.mjs +3 -0
- package/dist/logs/public.mjs.map +1 -0
- package/dist/logs/run-in-context.d.ts +9 -0
- package/dist/logs/run-in-context.js +21 -0
- package/dist/logs/run-in-context.js.map +1 -0
- package/dist/logs/types.d.ts +81 -0
- package/dist/{logger → logs}/types.js +2 -0
- package/dist/logs/types.js.map +1 -0
- package/dist/metrics/mongodb/monitor-mongodb-client.js +2 -2
- package/dist/metrics/mongodb/monitor-mongodb-client.js.map +1 -1
- package/dist/metrics/mongodb/public.d.mts +1 -0
- package/dist/metrics/mongodb/public.d.ts +1 -0
- package/dist/metrics/mongodb/{index.js → public.js} +2 -1
- package/dist/metrics/mongodb/public.js.map +1 -0
- package/dist/metrics/mongodb/public.mjs +3 -0
- package/dist/metrics/mongodb/public.mjs.map +1 -0
- package/dist/metrics/prometheus/index.d.ts +1 -1
- package/dist/metrics/prometheus/index.js +2 -2
- package/dist/metrics/prometheus/index.js.map +1 -1
- package/dist/metrics/prometheus/init-prometheus.d.ts +2 -2
- package/dist/metrics/prometheus/init-prometheus.js +11 -10
- package/dist/metrics/prometheus/init-prometheus.js.map +1 -1
- package/dist/metrics/prometheus/public.d.mts +1 -0
- package/dist/metrics/prometheus/public.d.ts +2 -0
- package/dist/metrics/prometheus/public.js +42 -0
- package/dist/metrics/prometheus/public.js.map +1 -0
- package/dist/metrics/prometheus/public.mjs +3 -0
- package/dist/metrics/prometheus/public.mjs.map +1 -0
- package/dist/otel/config.d.ts +3 -0
- package/dist/otel/config.js +7 -0
- package/dist/otel/config.js.map +1 -0
- package/dist/otel/index.d.ts +3 -0
- package/dist/otel/index.js +35 -0
- package/dist/otel/index.js.map +1 -0
- package/dist/otel/public.d.mts +1 -0
- package/dist/otel/public.d.ts +1 -0
- package/dist/otel/public.js +39 -0
- package/dist/otel/public.js.map +1 -0
- package/dist/otel/public.mjs +3 -0
- package/dist/otel/public.mjs.map +1 -0
- package/dist/otel/sdk.d.ts +2 -0
- package/dist/otel/sdk.js +41 -0
- package/dist/otel/sdk.js.map +1 -0
- package/dist/profiles/index.d.ts +2 -2
- package/dist/profiles/index.js +5 -4
- package/dist/profiles/index.js.map +1 -1
- package/package.json +40 -15
- package/dist/logger/config.js.map +0 -1
- package/dist/logger/index.d.ts +0 -1
- package/dist/logger/index.js +0 -6
- package/dist/logger/index.js.map +0 -1
- package/dist/logger/logger.d.ts +0 -90
- package/dist/logger/logger.js +0 -123
- package/dist/logger/logger.js.map +0 -1
- package/dist/logger/types.d.ts +0 -30
- package/dist/logger/types.js.map +0 -1
- package/dist/metrics/mongodb/index.d.ts +0 -1
- package/dist/metrics/mongodb/index.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.globalConfig = void 0;
|
|
4
|
+
exports.globalConfig = {
|
|
5
|
+
serviceName: process.env['CF_TELEMETRY_SERVICE_NAME'],
|
|
6
|
+
serviceVersion: process.env['CF_TELEMETRY_SERVICE_VERSION'],
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=global-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-config.js","sourceRoot":"","sources":["../src/global-config.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;IACrD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;CACnD,CAAC"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { init, terminate, } from './index.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Initializes telemetry services. Should be called once as early as possible in the application lifecycle.
|
|
3
|
+
* Preferred method of initialization is to add `--import=@codefresh-io/cf-telemetry/init` Node.js flag,
|
|
4
|
+
* instead of calling this function directly.
|
|
5
|
+
*/
|
|
3
6
|
export declare const init: () => Promise<void>;
|
|
4
|
-
export declare const
|
|
5
|
-
register: prom.client.Registry<"text/plain; version=0.0.4; charset=utf-8">;
|
|
6
|
-
metrics: typeof prom.metrics;
|
|
7
|
-
};
|
|
8
|
-
export declare const mongodb: {
|
|
9
|
-
monitorMongoDBClient: (client: import("mongodb").MongoClient, connectionPool?: string) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const logs: {
|
|
12
|
-
Logger: typeof log.Logger;
|
|
13
|
-
};
|
|
7
|
+
export declare const terminate: () => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -33,29 +33,44 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const
|
|
36
|
+
exports.terminate = exports.init = void 0;
|
|
37
|
+
// ↓ Should be imported first
|
|
38
|
+
const otel = __importStar(require("./otel"));
|
|
39
|
+
// ↑ Should be imported first
|
|
40
|
+
const logs = __importStar(require("./logs"));
|
|
41
|
+
const prometheus = __importStar(require("./metrics/prometheus"));
|
|
42
|
+
const profiles = __importStar(require("./profiles"));
|
|
43
|
+
let isInitialized = false;
|
|
44
|
+
/**
|
|
45
|
+
* Initializes telemetry services. Should be called once as early as possible in the application lifecycle.
|
|
46
|
+
* Preferred method of initialization is to add `--import=@codefresh-io/cf-telemetry/init` Node.js flag,
|
|
47
|
+
* instead of calling this function directly.
|
|
48
|
+
*/
|
|
41
49
|
const init = async () => {
|
|
42
|
-
|
|
50
|
+
if (isInitialized)
|
|
51
|
+
return;
|
|
52
|
+
const logger = new logs.Logger('telemetry');
|
|
43
53
|
logger.info('Initializing telemetry services');
|
|
54
|
+
await otel.init(logger).catch(logger.error);
|
|
44
55
|
await Promise.all([
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
prometheus.init(logger).catch(logger.error),
|
|
57
|
+
profiles.init(logger).catch(logger.error),
|
|
47
58
|
]);
|
|
59
|
+
isInitialized = true;
|
|
48
60
|
logger.info('Telemetry services initialized');
|
|
49
61
|
};
|
|
50
62
|
exports.init = init;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
const terminate = async () => {
|
|
64
|
+
const logger = new logs.Logger('telemetry');
|
|
65
|
+
try {
|
|
66
|
+
logger.info('Terminating telemetry services');
|
|
67
|
+
await otel.terminate(logger).catch(logger.error);
|
|
68
|
+
isInitialized = false;
|
|
69
|
+
logger.info('Telemetry services terminated');
|
|
70
|
+
}
|
|
71
|
+
catch (exception) {
|
|
72
|
+
logger.error('Failed to terminate telemetry services', exception);
|
|
73
|
+
}
|
|
60
74
|
};
|
|
75
|
+
exports.terminate = terminate;
|
|
61
76
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA6B;AAC7B,6CAA+B;AAC/B,6BAA6B;AAE7B,6CAA+B;AAC/B,iEAAmD;AACnD,qDAAuC;AAEvC,IAAI,aAAa,GAAG,KAAK,CAAC;AAE1B;;;;GAIG;AACI,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;IAC5C,IAAI,aAAa;QAAE,OAAO;IAE1B,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAC/C,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3C,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;KAC1C,CAAC,CAAC;IACH,aAAa,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;AAChD,CAAC,CAAC;AAZW,QAAA,IAAI,QAYf;AAEK,MAAM,SAAS,GAAG,KAAK,IAAmB,EAAE;IACjD,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC5C,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAC9C,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjD,aAAa,GAAG,KAAK,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,SAAS,EAAE,CAAC;QACnB,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;AACH,CAAC,CAAC;AAVW,QAAA,SAAS,aAUpB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,SAAS,GACV,MAAM,YAAY,CAAC"}
|
package/dist/init.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/init.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.mjs","sourceRoot":"","sources":["../src/init.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,6DAA6D;AAC7D,aAAa;AACb,MAAM,IAAI,EAAE,CAAC"}
|
|
@@ -10,5 +10,7 @@ if (!isKnownLevel)
|
|
|
10
10
|
exports.config = {
|
|
11
11
|
level: isKnownLevel ? detectedLevel : 'info',
|
|
12
12
|
shouldPrettify: process.env['CF_TELEMETRY_LOGS_PRETTIFY'] === 'true',
|
|
13
|
+
sync: process.env['CF_TELEMETRY_LOGS_SYNC'] === 'true',
|
|
14
|
+
defaultInitiator: { type: 'system' },
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/logs/config.ts"],"names":[],"mappings":";;;AAAA,mCAA6C;AAE7C,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,MAAM,CAAC;AACvE,8DAA8D;AAC9D,MAAM,YAAY,GAAG,aAAK,CAAC,QAAQ,CAAC,aAAoB,CAAC,CAAC;AAC1D,IAAI,CAAC,YAAY;IAAE,OAAO,CAAC,IAAI,CAAC,sBAAsB,aAAa,yBAAyB,CAAC,CAAC;AAEjF,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,aAAsB,CAAC,CAAC,CAAC,MAAM;IACrD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,KAAK,MAAM;IACpE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,KAAK,MAAM;IACtD,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAqC;CAC/D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runInContext = exports.Logger = void 0;
|
|
4
|
+
var logger_1 = require("./logger");
|
|
5
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
|
|
6
|
+
var run_in_context_1 = require("./run-in-context");
|
|
7
|
+
Object.defineProperty(exports, "runInContext", { enumerable: true, get: function () { return run_in_context_1.runInContext; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logs/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mDAAgD;AAAvC,8GAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Logger as ILogger, LoggerOptions, Scope } from './types';
|
|
2
|
+
export declare class Logger implements ILogger {
|
|
3
|
+
#private;
|
|
4
|
+
constructor(options?: Scope | LoggerOptions);
|
|
5
|
+
/**
|
|
6
|
+
* `debug` log level.
|
|
7
|
+
* @param err Error object to log.
|
|
8
|
+
*/
|
|
9
|
+
debug(err: Error): void;
|
|
10
|
+
/**
|
|
11
|
+
* `debug` log level.
|
|
12
|
+
* @param msg Message string to log.
|
|
13
|
+
* @param data Optional additional data to log.
|
|
14
|
+
*/
|
|
15
|
+
debug(msg: string, data?: unknown): void;
|
|
16
|
+
/**
|
|
17
|
+
* `info` log level.
|
|
18
|
+
* @param err Error object to log.
|
|
19
|
+
*/
|
|
20
|
+
info(err: Error): void;
|
|
21
|
+
/**
|
|
22
|
+
* `info` log level.
|
|
23
|
+
* @param msg Message string to log.
|
|
24
|
+
* @param data Optional additional data to log.
|
|
25
|
+
*/
|
|
26
|
+
info(msg: string, data?: unknown): void;
|
|
27
|
+
/**
|
|
28
|
+
* Alias for `info` log level.
|
|
29
|
+
*/
|
|
30
|
+
log: {
|
|
31
|
+
(err: Error): void;
|
|
32
|
+
(msg: string, data?: unknown): void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* `warn` log level.
|
|
36
|
+
* @param err Error object to log.
|
|
37
|
+
*/
|
|
38
|
+
warn(err: Error): void;
|
|
39
|
+
/**
|
|
40
|
+
* `warn` log level.
|
|
41
|
+
* @param msg Message string to log.
|
|
42
|
+
* @param data Optional additional data to log.
|
|
43
|
+
*/
|
|
44
|
+
warn(msg: string, data?: unknown): void;
|
|
45
|
+
/**
|
|
46
|
+
* `error` log level.
|
|
47
|
+
* @param err Error object to log.
|
|
48
|
+
*/
|
|
49
|
+
error(err: Error): void;
|
|
50
|
+
/**
|
|
51
|
+
* `error` log level.
|
|
52
|
+
* @param msg Message string to log.
|
|
53
|
+
* @param data Optional additional data to log.
|
|
54
|
+
*/
|
|
55
|
+
error(msg: string, data?: unknown): void;
|
|
56
|
+
/**
|
|
57
|
+
* Create child logger.
|
|
58
|
+
* @returns Child logger
|
|
59
|
+
*/
|
|
60
|
+
child(options?: Scope | LoggerOptions): Logger;
|
|
61
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Logger = void 0;
|
|
7
|
+
const pino_1 = __importDefault(require("pino"));
|
|
8
|
+
const config_1 = require("./config");
|
|
9
|
+
const metadata_storage_1 = require("./metadata-storage");
|
|
10
|
+
class Logger {
|
|
11
|
+
#options;
|
|
12
|
+
#baseLogger;
|
|
13
|
+
#defaultInitiator = config_1.config.defaultInitiator;
|
|
14
|
+
constructor(options = {}) {
|
|
15
|
+
this.#options = typeof options === 'string' ? { scope: options } : options;
|
|
16
|
+
this.#baseLogger = (0, pino_1.default)({
|
|
17
|
+
level: config_1.config.level,
|
|
18
|
+
base: null,
|
|
19
|
+
formatters: {
|
|
20
|
+
level: label => ({ level: label }),
|
|
21
|
+
},
|
|
22
|
+
...config_1.config.shouldPrettify && {
|
|
23
|
+
transport: {
|
|
24
|
+
target: 'pino-pretty',
|
|
25
|
+
options: {
|
|
26
|
+
colorize: true,
|
|
27
|
+
translateTime: 'UTC:yyyy-mm-dd HH:MM:ss.l o',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
}, pino_1.default.destination({ sync: config_1.config.sync }));
|
|
32
|
+
}
|
|
33
|
+
#getChildScope(childScope) {
|
|
34
|
+
return this.#options.scope
|
|
35
|
+
? `${this.#options.scope}${childScope ? `:${childScope}` : ''}`
|
|
36
|
+
: childScope;
|
|
37
|
+
}
|
|
38
|
+
#getChildOptions(parentOptions, childOptions) {
|
|
39
|
+
if (typeof childOptions === 'string')
|
|
40
|
+
childOptions = { scope: childOptions };
|
|
41
|
+
return {
|
|
42
|
+
...parentOptions,
|
|
43
|
+
...childOptions,
|
|
44
|
+
scope: this.#getChildScope(childOptions.scope),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
#write(level, ...args) {
|
|
48
|
+
const body = {
|
|
49
|
+
msg: undefined,
|
|
50
|
+
data: undefined,
|
|
51
|
+
err: undefined,
|
|
52
|
+
cf: metadata_storage_1.metadataStorage.getStore() ?? {},
|
|
53
|
+
scope_name: this.#options.useLastArgAsScope === true
|
|
54
|
+
&& !this.#options.scope
|
|
55
|
+
&& args.length > 1
|
|
56
|
+
&& typeof args.at(-1) === 'string'
|
|
57
|
+
? args.pop()
|
|
58
|
+
: this.#options.scope,
|
|
59
|
+
};
|
|
60
|
+
body.cf.initiator ??= this.#defaultInitiator;
|
|
61
|
+
const [msgOrErr, data] = args;
|
|
62
|
+
if (msgOrErr instanceof Error) {
|
|
63
|
+
body.err = msgOrErr;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
body.msg = msgOrErr;
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
|
+
body[data && data instanceof Error ? 'err' : 'data'] = data;
|
|
69
|
+
}
|
|
70
|
+
return this.#baseLogger[level](body);
|
|
71
|
+
}
|
|
72
|
+
debug(...args) {
|
|
73
|
+
this.#write('debug', ...args);
|
|
74
|
+
}
|
|
75
|
+
info(...args) {
|
|
76
|
+
this.#write('info', ...args);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Alias for `info` log level.
|
|
80
|
+
*/
|
|
81
|
+
log = this.info;
|
|
82
|
+
warn(...args) {
|
|
83
|
+
this.#write('warn', ...args);
|
|
84
|
+
}
|
|
85
|
+
error(...args) {
|
|
86
|
+
this.#write('error', ...args);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create child logger.
|
|
90
|
+
* @returns Child logger
|
|
91
|
+
*/
|
|
92
|
+
child(options = {}) {
|
|
93
|
+
return new Logger(this.#getChildOptions(this.#options, options));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.Logger = Logger;
|
|
97
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logs/logger.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.metadataStorage = void 0;
|
|
4
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
5
|
+
exports.metadataStorage = new node_async_hooks_1.AsyncLocalStorage();
|
|
6
|
+
//# sourceMappingURL=metadata-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-storage.js","sourceRoot":"","sources":["../../src/logs/metadata-storage.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAGxC,QAAA,eAAe,GAAG,IAAI,oCAAiB,EAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Logger, runInContext, } from './public.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Logger, runInContext, } from './index';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Public API (CommonJS)
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.runInContext = exports.Logger = void 0;
|
|
5
|
+
var index_1 = require("./index");
|
|
6
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return index_1.Logger; } });
|
|
7
|
+
Object.defineProperty(exports, "runInContext", { enumerable: true, get: function () { return index_1.runInContext; } });
|
|
8
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/logs/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;AAExB,iCAGiB;AAFf,+FAAA,MAAM,OAAA;AACN,qGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.mjs","sourceRoot":"","sources":["../../src/logs/public.mts"],"names":[],"mappings":"AAAA,mBAAmB;AAEnB,OAAO,EACL,MAAM,EACN,YAAY,GACb,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LogMetadata } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Provided metadata will be attached to each log line within the callback.
|
|
4
|
+
* `runInContext` will return the result of the callback.
|
|
5
|
+
* If the callback throws an error, it will be thrown by `runInContext` too.
|
|
6
|
+
*
|
|
7
|
+
* Nested calls of `runInContext` will merge metadata except for `initiator` key which can be provided only once.
|
|
8
|
+
*/
|
|
9
|
+
export declare const runInContext: <R, TArgs extends unknown[]>({ initiator, target, context }: LogMetadata, callback: (...args: TArgs) => R, ...args: TArgs) => R;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runInContext = void 0;
|
|
4
|
+
const metadata_storage_1 = require("./metadata-storage");
|
|
5
|
+
/**
|
|
6
|
+
* Provided metadata will be attached to each log line within the callback.
|
|
7
|
+
* `runInContext` will return the result of the callback.
|
|
8
|
+
* If the callback throws an error, it will be thrown by `runInContext` too.
|
|
9
|
+
*
|
|
10
|
+
* Nested calls of `runInContext` will merge metadata except for `initiator` key which can be provided only once.
|
|
11
|
+
*/
|
|
12
|
+
const runInContext = ({ initiator, target, context }, callback, ...args) => {
|
|
13
|
+
return metadata_storage_1.metadataStorage.run({
|
|
14
|
+
...initiator && { initiator }, // initiator can be provided only once, so it should not be merged
|
|
15
|
+
...metadata_storage_1.metadataStorage.getStore(),
|
|
16
|
+
...target && { target },
|
|
17
|
+
...context && { context },
|
|
18
|
+
}, callback, ...args);
|
|
19
|
+
};
|
|
20
|
+
exports.runInContext = runInContext;
|
|
21
|
+
//# sourceMappingURL=run-in-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-in-context.js","sourceRoot":"","sources":["../../src/logs/run-in-context.ts"],"names":[],"mappings":";;;AAAA,yDAAqD;AAGrD;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAC1B,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAe,EAC3C,QAA+B,EAC/B,GAAG,IAAW,EACX,EAAE;IACL,OAAO,kCAAe,CAAC,GAAG,CACxB;QACE,GAAG,SAAS,IAAI,EAAE,SAAS,EAAE,EAAE,kEAAkE;QACjG,GAAG,kCAAe,CAAC,QAAQ,EAAE;QAC7B,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE;QACvB,GAAG,OAAO,IAAI,EAAE,OAAO,EAAE;KAC1B,EACD,QAAQ,EACR,GAAG,IAAI,CACR,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,YAAY,gBAevB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { LoggerService } from '@nestjs/common';
|
|
2
|
+
export declare const Level: readonly ["debug", "info", "warn", "error"];
|
|
3
|
+
export type Level = (typeof Level[number]);
|
|
4
|
+
/**
|
|
5
|
+
* Scope name to be used for all log lines.
|
|
6
|
+
*/
|
|
7
|
+
export type Scope = string;
|
|
8
|
+
export interface LoggerOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Scope name to be used for all log lines.
|
|
11
|
+
*/
|
|
12
|
+
scope?: Scope;
|
|
13
|
+
/**
|
|
14
|
+
* If scope was not set during logger creation,
|
|
15
|
+
* and more than 1 arg is passed to the logger func,
|
|
16
|
+
* the last argument will be used as scope value.
|
|
17
|
+
* _Recommended to use only in NestJS for app logger (`app.useLogger()`)_.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
useLastArgAsScope?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export type LogMessage = string;
|
|
23
|
+
export type LogData = unknown;
|
|
24
|
+
export type LogArgs = [LogMessage, LogData?, Scope?] | [Error, Scope?];
|
|
25
|
+
export interface LogFn {
|
|
26
|
+
(err: Error, scope?: Scope): void;
|
|
27
|
+
(msg: LogMessage, data?: LogData, scope?: Scope): void;
|
|
28
|
+
}
|
|
29
|
+
export declare class Logger implements LoggerService {
|
|
30
|
+
constructor(options?: Scope | LoggerOptions);
|
|
31
|
+
debug: LogFn;
|
|
32
|
+
info: LogFn;
|
|
33
|
+
warn: LogFn;
|
|
34
|
+
error: LogFn;
|
|
35
|
+
log: LogFn;
|
|
36
|
+
child: (options?: Scope | LoggerOptions) => Logger;
|
|
37
|
+
}
|
|
38
|
+
export interface LogMetadata {
|
|
39
|
+
/**
|
|
40
|
+
* Initiator of the action. E.g. user, system, etc.
|
|
41
|
+
*/
|
|
42
|
+
initiator?: {
|
|
43
|
+
/**
|
|
44
|
+
* Type of the initiator. E.g. user, system, etc.
|
|
45
|
+
*/
|
|
46
|
+
type: string;
|
|
47
|
+
/**
|
|
48
|
+
* ID of the initiator.
|
|
49
|
+
*/
|
|
50
|
+
id?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Codefresh business entity affected by the action. E.g. classic_build, gitops_runtime, etc.
|
|
54
|
+
*/
|
|
55
|
+
target?: {
|
|
56
|
+
/**
|
|
57
|
+
* Type of the target. E.g. classic_build, gitops_runtime, etc.
|
|
58
|
+
*/
|
|
59
|
+
type: string;
|
|
60
|
+
/**
|
|
61
|
+
* ID of the target.
|
|
62
|
+
*/
|
|
63
|
+
id?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Additional context for the action.
|
|
67
|
+
*/
|
|
68
|
+
context?: {
|
|
69
|
+
/**
|
|
70
|
+
* Codefresh Account ID affected by the action.
|
|
71
|
+
*/
|
|
72
|
+
account_id?: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface LogBody {
|
|
76
|
+
msg?: LogMessage;
|
|
77
|
+
data?: LogData;
|
|
78
|
+
err?: Error;
|
|
79
|
+
cf: LogMetadata;
|
|
80
|
+
scope_name?: Scope;
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/logs/types.ts"],"names":[],"mappings":";;;AAEa,QAAA,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU,CAAC;AAqBhE,CAAC;AAQD,CAAC;AAWD,CAAC;AAsCD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.monitorMongoDBClient = void 0;
|
|
4
4
|
const mongodb_driver_prometheus_exporter_1 = require("@christiangalsterer/mongodb-driver-prometheus-exporter");
|
|
5
|
-
const
|
|
5
|
+
const logs_1 = require("../../logs");
|
|
6
6
|
const prometheus_1 = require("../prometheus");
|
|
7
7
|
const WarningCauses = {
|
|
8
8
|
AlreadyMonitored: 'client_already_monitored',
|
|
@@ -27,7 +27,7 @@ const monitoredClientsByPool = new Map();
|
|
|
27
27
|
* @param [connectionPool] Unique per application connection pool name, default is `"main"`. Required if you have multiple clients to monitor.
|
|
28
28
|
*/
|
|
29
29
|
const monitorMongoDBClient = (client, connectionPool = 'main') => {
|
|
30
|
-
const logger = new
|
|
30
|
+
const logger = new logs_1.Logger('monitoring:mongodb');
|
|
31
31
|
logger.info(`Initializing MongoDB monitoring for connection pool: ${connectionPool}`);
|
|
32
32
|
if (monitoredClients.has(client)) {
|
|
33
33
|
instrumentationWarnings.inc({ cause: WarningCauses.AlreadyMonitored, connection_pool: connectionPool });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor-mongodb-client.js","sourceRoot":"","sources":["../../../src/metrics/mongodb/monitor-mongodb-client.ts"],"names":[],"mappings":";;;AAAA,+GAA8F;AAE9F,
|
|
1
|
+
{"version":3,"file":"monitor-mongodb-client.js","sourceRoot":"","sources":["../../../src/metrics/mongodb/monitor-mongodb-client.ts"],"names":[],"mappings":";;;AAAA,+GAA8F;AAE9F,qCAAoC;AACpC,8CAAkD;AAElD,MAAM,aAAa,GAAG;IACpB,gBAAgB,EAAE,0BAA0B;IAC5C,sBAAsB,EAAE,2BAA2B;CAC3C,CAAC;AAEX,MAAM,uBAAuB,GAAG,IAAI,oBAAO,CAAC,OAAO,CAAC;IAClD,IAAI,EAAE,kDAAkD;IACxD,IAAI,EAAE,6DAA6D;IACnE,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAe,CAAC;AACpD,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEvE;;;;;;;;;;GAUG;AACI,MAAM,oBAAoB,GAAG,CAAC,MAAmB,EAAE,cAAc,GAAG,MAAM,EAAE,EAAE;IACnF,MAAM,MAAM,GAAG,IAAI,aAAM,CAAC,oBAAoB,CAAC,CAAC;IAChD,MAAM,CAAC,IAAI,CAAC,wDAAwD,cAAc,EAAE,CAAC,CAAC;IACtF,IAAI,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACjC,uBAAuB,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,gBAAgB,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;QACxG,MAAM,CAAC,IAAI,CAAC,iEAAiE,cAAc,EAAE,CAAC,CAAC;QAC/F,OAAO;IACT,CAAC;IACD,MAAM,6BAA6B,GAAG,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;IAC5F,IAAI,6BAA6B,EAAE,CAAC;QAClC,uBAAuB,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;QAC9G,MAAM,CAAC,IAAI,CAAC,4HAA4H,cAAc,GAAG,CAAC,CAAC;IAC7J,CAAC;IAED,sBAAsB,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,IAAA,yDAAoB,EAClB,MAAM,EACN,qBAAQ,EACR;QACE,aAAa,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE;QAClD,MAAM;KACP,CACF,CAAC;IACF,MAAM,CAAC,IAAI,CAAC,uDAAuD,cAAc,EAAE,CAAC,CAAC;AACvF,CAAC,CAAC;AAzBW,QAAA,oBAAoB,wBAyB/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { monitorMongoDBClient, } from './public.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { monitorMongoDBClient, } from './monitor-mongodb-client';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Public API (CommonJS)
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.monitorMongoDBClient = void 0;
|
|
4
5
|
var monitor_mongodb_client_1 = require("./monitor-mongodb-client");
|
|
5
6
|
Object.defineProperty(exports, "monitorMongoDBClient", { enumerable: true, get: function () { return monitor_mongodb_client_1.monitorMongoDBClient; } });
|
|
6
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/metrics/mongodb/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;AAExB,mEAEkC;AADhC,8HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.mjs","sourceRoot":"","sources":["../../../src/metrics/mongodb/public.mts"],"names":[],"mappings":"AAAA,mBAAmB;AAEnB,OAAO,EACL,oBAAoB,GACrB,MAAM,aAAa,CAAC"}
|
|
@@ -33,11 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.metrics = exports.
|
|
36
|
+
exports.metrics = exports.init = exports.register = exports.client = void 0;
|
|
37
37
|
var client_1 = require("./client");
|
|
38
38
|
Object.defineProperty(exports, "client", { enumerable: true, get: function () { return client_1.client; } });
|
|
39
39
|
Object.defineProperty(exports, "register", { enumerable: true, get: function () { return client_1.register; } });
|
|
40
40
|
var init_prometheus_1 = require("./init-prometheus");
|
|
41
|
-
Object.defineProperty(exports, "
|
|
41
|
+
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_prometheus_1.init; } });
|
|
42
42
|
exports.metrics = __importStar(require("./metrics"));
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metrics/prometheus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA4C;AAAnC,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metrics/prometheus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA4C;AAAnC,gGAAA,MAAM,OAAA;AAAE,kGAAA,QAAQ,OAAA;AACzB,qDAAyC;AAAhC,uGAAA,IAAI,OAAA;AACb,qDAAqC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Logger } from '../../
|
|
2
|
-
export declare const
|
|
1
|
+
import type { Logger } from '../../logs';
|
|
2
|
+
export declare const init: (logger: Logger) => Promise<void>;
|