@codefresh-io/cf-telemetry 2.2.0-alpha.5 → 2.2.0-alpha.8

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.
@@ -1,37 +1,9 @@
1
1
  "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
35
7
  };
36
8
  Object.defineProperty(exports, "__esModule", { value: true });
37
9
  exports.LoggerModule = void 0;
@@ -39,31 +11,24 @@ const common_1 = require("@nestjs/common");
39
11
  const express_1 = require("../express");
40
12
  const logger_1 = require("./logger");
41
13
  // TODO: add options to configure the logger
42
- let LoggerModule = (() => {
43
- let _classDecorators = [(0, common_1.Global)(), (0, common_1.Module)({
44
- providers: [logger_1.Logger],
45
- exports: [logger_1.Logger],
46
- })];
47
- let _classDescriptor;
48
- let _classExtraInitializers = [];
49
- let _classThis;
50
- var LoggerModule = class {
51
- static { _classThis = this; }
52
- static {
53
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
54
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
55
- LoggerModule = _classThis = _classDescriptor.value;
56
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
57
- __runInitializers(_classThis, _classExtraInitializers);
58
- }
59
- configure(consumer) {
60
- const middleware = (0, express_1.httpLoggerMiddlewareFactory)(new logger_1.Logger('http'), 'info');
61
- consumer
62
- .apply(middleware)
63
- .forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
64
- }
65
- };
66
- return LoggerModule = _classThis;
67
- })();
14
+ let LoggerModule = class LoggerModule {
15
+ configure(consumer) {
16
+ const middleware = (0, express_1.httpLoggerMiddlewareFactory)(new logger_1.Logger('http'), 'info');
17
+ consumer
18
+ .apply(middleware)
19
+ .forRoutes({ path: '*', method: common_1.RequestMethod.ALL });
20
+ }
21
+ };
68
22
  exports.LoggerModule = LoggerModule;
23
+ exports.LoggerModule = LoggerModule = __decorate([
24
+ (0, common_1.Global)(),
25
+ (0, common_1.Module)({
26
+ providers: [logger_1.Logger],
27
+ exports: [logger_1.Logger],
28
+ })
29
+ /**
30
+ * LoggerModule is a global module that provides a logger service,
31
+ * and enables HTTP logging middleware.
32
+ */
33
+ ], LoggerModule);
69
34
  //# sourceMappingURL=logger-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger-module.js","sourceRoot":"","sources":["../../../src/logs/nest/logger-module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+F;AAC/F,wCAAyD;AACzD,qCAAkC;AAElC,4CAA4C;IAW/B,YAAY;4BATxB,IAAA,eAAM,GAAE,EACR,IAAA,eAAM,EAAC;YACN,SAAS,EAAE,CAAC,eAAM,CAAC;YACnB,OAAO,EAAE,CAAC,eAAM,CAAC;SAClB,CAAC;;;;;;;;YAKF,6KAOC;;;YAPY,uDAAY;;QACvB,SAAS,CAAC,QAA4B;YACpC,MAAM,UAAU,GAAG,IAAA,qCAA2B,EAAC,IAAI,eAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;YAC3E,QAAQ;iBACL,KAAK,CAAC,UAAU,CAAC;iBACjB,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;QACzD,CAAC;;;;AANU,oCAAY"}
1
+ {"version":3,"file":"logger-module.js","sourceRoot":"","sources":["../../../src/logs/nest/logger-module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+F;AAC/F,wCAAyD;AACzD,qCAAkC;AAElC,4CAA4C;AAWrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,SAAS,CAAC,QAA4B;QACpC,MAAM,UAAU,GAAG,IAAA,qCAA2B,EAAC,IAAI,eAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QAC3E,QAAQ;aACL,KAAK,CAAC,UAAU,CAAC;aACjB,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAPY,oCAAY;uBAAZ,YAAY;IATxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,eAAM,CAAC;QACnB,OAAO,EAAE,CAAC,eAAM,CAAC;KAClB,CAAC;IACF;;;OAGG;GACU,YAAY,CAOxB"}
@@ -1,69 +1,28 @@
1
1
  "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
35
7
  };
36
8
  Object.defineProperty(exports, "__esModule", { value: true });
37
9
  exports.Logger = void 0;
38
10
  const common_1 = require("@nestjs/common");
39
11
  const logger_1 = require("../logger");
40
- let Logger = (() => {
41
- let _classDecorators = [(0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT })];
42
- let _classDescriptor;
43
- let _classExtraInitializers = [];
44
- let _classThis;
45
- let _classSuper = logger_1.Logger;
46
- var Logger = class extends _classSuper {
47
- static { _classThis = this; }
48
- static {
49
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
50
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
51
- Logger = _classThis = _classDescriptor.value;
52
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
53
- __runInitializers(_classThis, _classExtraInitializers);
12
+ let Logger = class Logger extends logger_1.Logger {
13
+ constructor(...params) {
14
+ let options = params?.at(0);
15
+ if (typeof options === 'string') {
16
+ options = { scope: options, useLastArgAsScope: true };
54
17
  }
55
- constructor(...params) {
56
- let options = params?.at(0);
57
- if (typeof options === 'string') {
58
- options = { scope: options, useLastArgAsScope: true };
59
- }
60
- else {
61
- options = { ...options, useLastArgAsScope: true };
62
- }
63
- super(options);
18
+ else {
19
+ options = { ...options, useLastArgAsScope: true };
64
20
  }
65
- };
66
- return Logger = _classThis;
67
- })();
21
+ super(options);
22
+ }
23
+ };
68
24
  exports.Logger = Logger;
25
+ exports.Logger = Logger = __decorate([
26
+ (0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT })
27
+ ], Logger);
69
28
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logs/nest/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAmD;AACnD,sCAAiD;IAGpC,MAAM;4BADlB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,SAAS,EAAE,CAAC;;;;sBACX,eAAU;sBAAlB,SAAQ,WAAU;;;;YAAtC,6KAUC;;;YAVY,uDAAM;;QACjB,YAAY,GAAG,MAAgD;YAC7D,IAAI,OAAO,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBAChC,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;YACpD,CAAC;YACD,KAAK,CAAC,OAAO,CAAC,CAAC;QACjB,CAAC;;;;AATU,wBAAM"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logs/nest/logger.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAmD;AACnD,sCAAiD;AAG1C,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,eAAU;IACpC,YAAY,GAAG,MAAgD;QAC7D,IAAI,OAAO,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QACpD,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF,CAAA;AAVY,wBAAM;iBAAN,MAAM;IADlB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,SAAS,EAAE,CAAC;GAC1B,MAAM,CAUlB"}
@@ -6,3 +6,43 @@ import { api } from '@opentelemetry/sdk-node';
6
6
  * Utility wrapper for {@link api.trace.getTracer|api.trace.getTracer}
7
7
  **/
8
8
  export declare const getTracer: () => api.Tracer;
9
+ /**
10
+ * Decorator wraps a class method in an active span. Both sync and async methods are supported.
11
+ * If an error is thrown by decorated method, span status is set to `ERROR`
12
+ * and the exception is recorded to span events.
13
+ *
14
+ * The span name is set to the `<ClassName> <methodName>`.
15
+ *
16
+ * @param kind {@link api.SpanKind|SpanKind}. Default is `SpanKind.INTERNAL`.
17
+ */
18
+ export declare const Span: (kind?: api.SpanKind) => (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<(...args: any[]) => any>) => TypedPropertyDescriptor<(...args: any[]) => any>;
19
+ /**
20
+ * Well-known Span attribute names.
21
+ */
22
+ export declare const Attributes: {
23
+ /** Codefresh account ID. Attribute value: `string` */
24
+ readonly AccountId: "cf.account.id";
25
+ /** Codefresh account IDs. Attribute value: `string[]` */
26
+ readonly AccountIds: "cf.account.ids";
27
+ /** Codefresh account IDs count. Attribute value: `number` */
28
+ readonly AccountIdsCount: "cf.account.ids.count";
29
+ /** Codefresh account name. Attribute value: `string` */
30
+ readonly AccountName: "cf.account.name";
31
+ /** Codefresh account names. Attribute value: `string[]` */
32
+ readonly AccountNames: "cf.account.names";
33
+ /** Codefresh account names count. Attribute value: `number` */
34
+ readonly AccountNamesCount: "cf.account.names.count";
35
+ /** Codefresh user ID. Attribute value: `string` */
36
+ readonly UserId: "cf.user.id";
37
+ /** Codefresh user IDs. Attribute value: `string[]` */
38
+ readonly UserIds: "cf.user.ids";
39
+ /** Codefresh user IDs count. Attribute value: `number` */
40
+ readonly UserIdsCount: "cf.user.ids.count";
41
+ /** Codefresh user name. Attribute value: `string` */
42
+ readonly UserName: "cf.user.name";
43
+ /** Codefresh user names. Attribute value: `string[]` */
44
+ readonly UserNames: "cf.user.names";
45
+ /** Codefresh user names count. Attribute value: `number` */
46
+ readonly UserNamesCount: "cf.user.names.count";
47
+ };
48
+ export type Attributes = typeof Attributes[keyof typeof Attributes];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTracer = void 0;
3
+ exports.Attributes = exports.Span = exports.getTracer = void 0;
4
4
  const sdk_node_1 = require("@opentelemetry/sdk-node");
5
5
  const global_config_1 = require("../global-config");
6
6
  /**
@@ -13,4 +13,104 @@ const getTracer = () => {
13
13
  return sdk_node_1.api.trace.getTracer(global_config_1.globalConfig.serviceName, global_config_1.globalConfig.serviceVersion);
14
14
  };
15
15
  exports.getTracer = getTracer;
16
+ /**
17
+ * Decorator wraps a class method in an active span. Both sync and async methods are supported.
18
+ * If an error is thrown by decorated method, span status is set to `ERROR`
19
+ * and the exception is recorded to span events.
20
+ *
21
+ * The span name is set to the `<ClassName> <methodName>`.
22
+ *
23
+ * @param kind {@link api.SpanKind|SpanKind}. Default is `SpanKind.INTERNAL`.
24
+ */
25
+ const Span = (kind = sdk_node_1.api.SpanKind.INTERNAL) => {
26
+ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types, @typescript-eslint/no-explicit-any
27
+ return (target, propertyKey, descriptor) => {
28
+ const originalMethod = descriptor.value;
29
+ descriptor.value = function (...args) {
30
+ return (0, exports.getTracer)().startActiveSpan(`${target.constructor.name} ${String(propertyKey)}`, { kind }, (span) => {
31
+ try {
32
+ const result = originalMethod.apply(this, args);
33
+ /**
34
+ * It is crucial to check for thenables instead of Promises,
35
+ * because multiple libs (like mongoose) use a custom Promise implementation.
36
+ */
37
+ if (typeof result?.then === 'function') {
38
+ return result
39
+ .then((res) => {
40
+ // Async success handling
41
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.OK });
42
+ span.end();
43
+ return res;
44
+ })
45
+ .catch((exception) => {
46
+ // Async error handling
47
+ if (exception instanceof Error) {
48
+ span.recordException(exception);
49
+ span.setStatus({
50
+ code: sdk_node_1.api.SpanStatusCode.ERROR,
51
+ message: exception.message,
52
+ });
53
+ }
54
+ else {
55
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.ERROR });
56
+ }
57
+ span.end();
58
+ throw exception;
59
+ });
60
+ }
61
+ // Sync success handling
62
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.OK });
63
+ span.end();
64
+ return result;
65
+ }
66
+ catch (exception) {
67
+ // Sync error handling
68
+ if (exception instanceof Error) {
69
+ span.recordException(exception);
70
+ span.setStatus({
71
+ code: sdk_node_1.api.SpanStatusCode.ERROR,
72
+ message: exception.message,
73
+ });
74
+ }
75
+ else {
76
+ span.setStatus({ code: sdk_node_1.api.SpanStatusCode.ERROR });
77
+ }
78
+ span.end();
79
+ throw exception;
80
+ }
81
+ });
82
+ };
83
+ return descriptor;
84
+ };
85
+ };
86
+ exports.Span = Span;
87
+ /**
88
+ * Well-known Span attribute names.
89
+ */
90
+ exports.Attributes = {
91
+ /** Codefresh account ID. Attribute value: `string` */
92
+ AccountId: 'cf.account.id',
93
+ /** Codefresh account IDs. Attribute value: `string[]` */
94
+ AccountIds: 'cf.account.ids',
95
+ /** Codefresh account IDs count. Attribute value: `number` */
96
+ AccountIdsCount: 'cf.account.ids.count',
97
+ /** Codefresh account name. Attribute value: `string` */
98
+ AccountName: 'cf.account.name',
99
+ /** Codefresh account names. Attribute value: `string[]` */
100
+ AccountNames: 'cf.account.names',
101
+ /** Codefresh account names count. Attribute value: `number` */
102
+ AccountNamesCount: 'cf.account.names.count',
103
+ /** Codefresh user ID. Attribute value: `string` */
104
+ UserId: 'cf.user.id',
105
+ /** Codefresh user IDs. Attribute value: `string[]` */
106
+ UserIds: 'cf.user.ids',
107
+ /** Codefresh user IDs count. Attribute value: `number` */
108
+ UserIdsCount: 'cf.user.ids.count',
109
+ /** Codefresh user name. Attribute value: `string` */
110
+ UserName: 'cf.user.name',
111
+ /** Codefresh user names. Attribute value: `string[]` */
112
+ UserNames: 'cf.user.names',
113
+ /** Codefresh user names count. Attribute value: `number` */
114
+ UserNamesCount: 'cf.user.names.count',
115
+ };
16
116
  //# sourceMappingURL=cf-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cf-helpers.js","sourceRoot":"","sources":["../../src/otel/cf-helpers.ts"],"names":[],"mappings":";;;AAAA,sDAA8C;AAC9C,oDAAgD;AAEhD;;;;;IAKI;AACG,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,cAAG,CAAC,KAAK,CAAC,SAAS,CAAC,4BAAY,CAAC,WAAW,EAAE,4BAAY,CAAC,cAAc,CAAC,CAAC;AACpF,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
1
+ {"version":3,"file":"cf-helpers.js","sourceRoot":"","sources":["../../src/otel/cf-helpers.ts"],"names":[],"mappings":";;;AAAA,sDAA8C;AAC9C,oDAAgD;AAEhD;;;;;IAKI;AACG,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,c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DAA6D;IAC7D,eAAe,EAAE,sBAAsB;IACvC,wDAAwD;IACxD,WAAW,EAAE,iBAAiB;IAC9B,2DAA2D;IAC3D,YAAY,EAAE,kBAAkB;IAChC,+DAA+D;IAC/D,iBAAiB,EAAE,wBAAwB;IAC3C,mDAAmD;IACnD,MAAM,EAAE,YAAY;IACpB,sDAAsD;IACtD,OAAO,EAAE,aAAa;IACtB,0DAA0D;IAC1D,YAAY,EAAE,mBAAmB;IACjC,qDAAqD;IACrD,QAAQ,EAAE,cAAc;IACxB,wDAAwD;IACxD,SAAS,EAAE,eAAe;IAC1B,4DAA4D;IAC5D,cAAc,EAAE,qBAAqB;CACuB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from '@opentelemetry/sdk-node';
2
+ /** Codefresh-developed utils for OTel */
2
3
  export * as cf from './cf-helpers';
@@ -39,5 +39,6 @@ var __importStar = (this && this.__importStar) || (function () {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.cf = void 0;
41
41
  __exportStar(require("@opentelemetry/sdk-node"), exports);
42
+ /** Codefresh-developed utils for OTel */
42
43
  exports.cf = __importStar(require("./cf-helpers"));
43
44
  //# sourceMappingURL=public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/otel/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExB,0DAAwC;AACxC,mDAAmC"}
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/otel/public.ts"],"names":[],"mappings":";AAAA,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExB,0DAAwC;AAExC,yCAAyC;AACzC,mDAAmC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefresh-io/cf-telemetry",
3
- "version": "2.2.0-alpha.5",
3
+ "version": "2.2.0-alpha.8",
4
4
  "exports": {
5
5
  "./init": {
6
6
  "import": "./dist/init.mjs",