@eqxjs/nest-opentelemetry 1.0.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/dto/header.dto.d.ts +25 -0
- package/dist/dto/header.dto.js +3 -0
- package/dist/dto/header.dto.js.map +1 -0
- package/dist/dto/m1.dto.d.ts +7 -0
- package/dist/dto/m1.dto.js +3 -0
- package/dist/dto/m1.dto.js.map +1 -0
- package/dist/dto/m2.dto.d.ts +5 -0
- package/dist/dto/m2.dto.js +3 -0
- package/dist/dto/m2.dto.js.map +1 -0
- package/dist/dto/m3.dto.d.ts +5 -0
- package/dist/dto/m3.dto.js +3 -0
- package/dist/dto/m3.dto.js.map +1 -0
- package/dist/dto/protocol.dto.d.ts +14 -0
- package/dist/dto/protocol.dto.js +3 -0
- package/dist/dto/protocol.dto.js.map +1 -0
- package/dist/dto/service.dto.d.ts +29 -0
- package/dist/dto/service.dto.js +3 -0
- package/dist/dto/service.dto.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/otlp.logger.module.d.ts +3 -0
- package/dist/logger/otlp.logger.module.js +26 -0
- package/dist/logger/otlp.logger.module.js.map +1 -0
- package/dist/logger/otlp.logger.service.d.ts +15 -0
- package/dist/logger/otlp.logger.service.js +43 -0
- package/dist/logger/otlp.logger.service.js.map +1 -0
- package/dist/modules/index.d.ts +5 -0
- package/dist/modules/index.js +14 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/otlp.auto.d.ts +3 -0
- package/dist/modules/otlp.auto.js +11 -0
- package/dist/modules/otlp.auto.js.map +1 -0
- package/dist/modules/otlp.express.d.ts +4 -0
- package/dist/modules/otlp.express.js +11 -0
- package/dist/modules/otlp.express.js.map +1 -0
- package/dist/modules/otlp.http.d.ts +4 -0
- package/dist/modules/otlp.http.js +11 -0
- package/dist/modules/otlp.http.js.map +1 -0
- package/dist/modules/otlp.kafka.d.ts +4 -0
- package/dist/modules/otlp.kafka.js +68 -0
- package/dist/modules/otlp.kafka.js.map +1 -0
- package/dist/modules/otlp.nestjs.d.ts +4 -0
- package/dist/modules/otlp.nestjs.js +11 -0
- package/dist/modules/otlp.nestjs.js.map +1 -0
- package/dist/otlp.app.d.ts +2 -0
- package/dist/otlp.app.js +63 -0
- package/dist/otlp.app.js.map +1 -0
- package/dist/tracer/modules/common/m1.common.d.ts +3 -0
- package/dist/tracer/modules/common/m1.common.js +25 -0
- package/dist/tracer/modules/common/m1.common.js.map +1 -0
- package/dist/tracer/modules/common/m2.common.d.ts +3 -0
- package/dist/tracer/modules/common/m2.common.js +47 -0
- package/dist/tracer/modules/common/m2.common.js.map +1 -0
- package/dist/tracer/modules/common/m3.common.d.ts +3 -0
- package/dist/tracer/modules/common/m3.common.js +50 -0
- package/dist/tracer/modules/common/m3.common.js.map +1 -0
- package/dist/tracer/modules/index.d.ts +9 -0
- package/dist/tracer/modules/index.js +22 -0
- package/dist/tracer/modules/index.js.map +1 -0
- package/dist/tracer/modules/otlp.auto.d.ts +3 -0
- package/dist/tracer/modules/otlp.auto.js +11 -0
- package/dist/tracer/modules/otlp.auto.js.map +1 -0
- package/dist/tracer/modules/otlp.azure.d.ts +4 -0
- package/dist/tracer/modules/otlp.azure.js +11 -0
- package/dist/tracer/modules/otlp.azure.js.map +1 -0
- package/dist/tracer/modules/otlp.express.d.ts +4 -0
- package/dist/tracer/modules/otlp.express.js +30 -0
- package/dist/tracer/modules/otlp.express.js.map +1 -0
- package/dist/tracer/modules/otlp.http.d.ts +4 -0
- package/dist/tracer/modules/otlp.http.js +30 -0
- package/dist/tracer/modules/otlp.http.js.map +1 -0
- package/dist/tracer/modules/otlp.ioredis.d.ts +4 -0
- package/dist/tracer/modules/otlp.ioredis.js +11 -0
- package/dist/tracer/modules/otlp.ioredis.js.map +1 -0
- package/dist/tracer/modules/otlp.kafka.d.ts +4 -0
- package/dist/tracer/modules/otlp.kafka.js +45 -0
- package/dist/tracer/modules/otlp.kafka.js.map +1 -0
- package/dist/tracer/modules/otlp.nestjs.d.ts +4 -0
- package/dist/tracer/modules/otlp.nestjs.js +11 -0
- package/dist/tracer/modules/otlp.nestjs.js.map +1 -0
- package/dist/tracer/modules/otlp.redis.d.ts +4 -0
- package/dist/tracer/modules/otlp.redis.js +11 -0
- package/dist/tracer/modules/otlp.redis.js.map +1 -0
- package/dist/tracer/modules/otlp.socket-io.d.ts +4 -0
- package/dist/tracer/modules/otlp.socket-io.js +18 -0
- package/dist/tracer/modules/otlp.socket-io.js.map +1 -0
- package/dist/tracer/otlp.app.d.ts +2 -0
- package/dist/tracer/otlp.app.js +101 -0
- package/dist/tracer/otlp.app.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +38 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface DataHeaderI {
|
|
2
|
+
functionName: any;
|
|
3
|
+
useCaseAge: string;
|
|
4
|
+
agent: string;
|
|
5
|
+
version: string;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
orgService: string;
|
|
8
|
+
from: string;
|
|
9
|
+
channel: string;
|
|
10
|
+
broker: string;
|
|
11
|
+
useCase: string;
|
|
12
|
+
useCaseStep: string;
|
|
13
|
+
session: string;
|
|
14
|
+
transaction: string;
|
|
15
|
+
communication: string;
|
|
16
|
+
groupTags: [];
|
|
17
|
+
identity: {
|
|
18
|
+
device?: string | string[];
|
|
19
|
+
public?: string;
|
|
20
|
+
user?: string;
|
|
21
|
+
};
|
|
22
|
+
tmfSpec: string;
|
|
23
|
+
baseApiVersion: string;
|
|
24
|
+
instanceData: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.dto.js","sourceRoot":"","sources":["../../src/dto/header.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m1.dto.js","sourceRoot":"","sources":["../../src/dto/m1.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m2.dto.js","sourceRoot":"","sources":["../../src/dto/m2.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m3.dto.js","sourceRoot":"","sources":["../../src/dto/m3.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DataProtocolI {
|
|
2
|
+
version: string;
|
|
3
|
+
command: string;
|
|
4
|
+
subCommand: string;
|
|
5
|
+
invoke: string;
|
|
6
|
+
qos: string;
|
|
7
|
+
topic: string;
|
|
8
|
+
token: string;
|
|
9
|
+
service: string;
|
|
10
|
+
locationInfo: string;
|
|
11
|
+
networkInfo: string;
|
|
12
|
+
deviceInfo: string;
|
|
13
|
+
diagMessage: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.dto.js","sourceRoot":"","sources":["../../src/dto/protocol.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DataServiceI {
|
|
2
|
+
functionName: any;
|
|
3
|
+
useCaseAge: any;
|
|
4
|
+
agent: any;
|
|
5
|
+
from: string;
|
|
6
|
+
version: string;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
channel?: string;
|
|
9
|
+
broker?: string;
|
|
10
|
+
useCase?: string;
|
|
11
|
+
useCaseStep?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
invoke: string;
|
|
14
|
+
session: string;
|
|
15
|
+
transaction: string;
|
|
16
|
+
token?: string;
|
|
17
|
+
orgService: string;
|
|
18
|
+
communication?: string;
|
|
19
|
+
groupTags?: string[];
|
|
20
|
+
identity: {
|
|
21
|
+
device?: string | string[];
|
|
22
|
+
public?: string;
|
|
23
|
+
user?: string;
|
|
24
|
+
};
|
|
25
|
+
locationInfo: string;
|
|
26
|
+
networkInfo: string;
|
|
27
|
+
deviceInfo: string;
|
|
28
|
+
diagMessage: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.dto.js","sourceRoot":"","sources":["../../src/dto/service.dto.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EqxOtlpService = exports.EqxOtlpModule = exports.eqxOtlp = void 0;
|
|
4
|
+
var otlp_app_1 = require("./tracer/otlp.app");
|
|
5
|
+
Object.defineProperty(exports, "eqxOtlp", { enumerable: true, get: function () { return otlp_app_1.eqxOtlp; } });
|
|
6
|
+
var otlp_logger_module_1 = require("./logger/otlp.logger.module");
|
|
7
|
+
Object.defineProperty(exports, "EqxOtlpModule", { enumerable: true, get: function () { return otlp_logger_module_1.EqxOtlpModule; } });
|
|
8
|
+
var otlp_logger_service_1 = require("./logger/otlp.logger.service");
|
|
9
|
+
Object.defineProperty(exports, "EqxOtlpService", { enumerable: true, get: function () { return otlp_logger_service_1.EqxOtlpService; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA4C;AAAnC,mGAAA,OAAO,OAAA;AAChB,kEAA4D;AAAnD,mHAAA,aAAa,OAAA;AACtB,oEAA8D;AAArD,qHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EqxOtlpModule = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const otlp_logger_service_1 = require("./otlp.logger.service");
|
|
15
|
+
let EqxOtlpModule = class EqxOtlpModule {
|
|
16
|
+
constructor() { }
|
|
17
|
+
};
|
|
18
|
+
exports.EqxOtlpModule = EqxOtlpModule;
|
|
19
|
+
exports.EqxOtlpModule = EqxOtlpModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
providers: [otlp_logger_service_1.EqxOtlpService],
|
|
22
|
+
exports: [otlp_logger_service_1.EqxOtlpService],
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:paramtypes", [])
|
|
25
|
+
], EqxOtlpModule);
|
|
26
|
+
//# sourceMappingURL=otlp.logger.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.logger.module.js","sourceRoot":"","sources":["../../src/logger/otlp.logger.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAwC;AACxC,+DAAuD;AAMhD,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,gBAAe,CAAC;CACjB,CAAA;AAFY,sCAAa;wBAAb,aAAa;IAJzB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,oCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,oCAAc,CAAC;KAC1B,CAAC;;GACW,aAAa,CAEzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Logger as OtlpLogger } from "@opentelemetry/api-logs";
|
|
2
|
+
import { LoggerOptions, Logger } from "@opentelemetry/api-logs";
|
|
3
|
+
export declare class EqxOtlpService {
|
|
4
|
+
private loggerProvider;
|
|
5
|
+
logger: OtlpLogger;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Get a logger with the configuration of the LoggerProvider.
|
|
9
|
+
* @param name — The name of the logger or instrumentation library.
|
|
10
|
+
* @param version — The version of the logger or instrumentation library.
|
|
11
|
+
* @param options — The options of the logger or instrumentation library.
|
|
12
|
+
* @returns — Logger A Logger with the given name and version
|
|
13
|
+
*/
|
|
14
|
+
getLogger(name: string, version?: string, options?: LoggerOptions): Logger;
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EqxOtlpService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const sdk_logs_1 = require("@opentelemetry/sdk-logs");
|
|
15
|
+
const exporter_logs_otlp_http_1 = require("@opentelemetry/exporter-logs-otlp-http");
|
|
16
|
+
let EqxOtlpService = class EqxOtlpService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.loggerProvider = undefined;
|
|
19
|
+
if (process.env.LOGGER_URL) {
|
|
20
|
+
this.loggerProvider = new sdk_logs_1.LoggerProvider();
|
|
21
|
+
this.loggerProvider.addLogRecordProcessor(new sdk_logs_1.BatchLogRecordProcessor(new exporter_logs_otlp_http_1.OTLPLogExporter({
|
|
22
|
+
url: process.env.LOGGER_URL, // url is optional and can be omitted - default is http://localhost:4318/v1/logs
|
|
23
|
+
keepAlive: true,
|
|
24
|
+
})));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get a logger with the configuration of the LoggerProvider.
|
|
29
|
+
* @param name — The name of the logger or instrumentation library.
|
|
30
|
+
* @param version — The version of the logger or instrumentation library.
|
|
31
|
+
* @param options — The options of the logger or instrumentation library.
|
|
32
|
+
* @returns — Logger A Logger with the given name and version
|
|
33
|
+
*/
|
|
34
|
+
getLogger(name, version, options) {
|
|
35
|
+
return this.loggerProvider.getLogger(name, version, options);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.EqxOtlpService = EqxOtlpService;
|
|
39
|
+
exports.EqxOtlpService = EqxOtlpService = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [])
|
|
42
|
+
], EqxOtlpService);
|
|
43
|
+
//# sourceMappingURL=otlp.logger.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.logger.service.js","sourceRoot":"","sources":["../../src/logger/otlp.logger.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sDAGiC;AACjC,oFAAyE;AAKlE,IAAM,cAAc,GAApB,MAAM,cAAc;IAGzB;QAFQ,mBAAc,GAAmB,SAAS,CAAC;QAGjD,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;YAC3B,IAAI,CAAC,cAAc,GAAG,IAAI,yBAAc,EAAE,CAAC;YAC3C,IAAI,CAAC,cAAc,CAAC,qBAAqB,CACvC,IAAI,kCAAuB,CACzB,IAAI,yCAAe,CAAC;gBAClB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,gFAAgF;gBAC7G,SAAS,EAAE,IAAI;aAChB,CAAC,CACH,CACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACI,SAAS,CACd,IAAY,EACZ,OAAgB,EAChB,OAAuB;QAEvB,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AA/BY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;;GACA,cAAc,CA+B1B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPNestjs = exports.OTLPKafka = exports.OTLPHttp = exports.OTLPexpress = exports.OTLPAuto = void 0;
|
|
4
|
+
var otlp_auto_1 = require("./otlp.auto");
|
|
5
|
+
Object.defineProperty(exports, "OTLPAuto", { enumerable: true, get: function () { return otlp_auto_1.OTLPAuto; } });
|
|
6
|
+
var otlp_express_1 = require("./otlp.express");
|
|
7
|
+
Object.defineProperty(exports, "OTLPexpress", { enumerable: true, get: function () { return otlp_express_1.OTLPexpress; } });
|
|
8
|
+
var otlp_http_1 = require("./otlp.http");
|
|
9
|
+
Object.defineProperty(exports, "OTLPHttp", { enumerable: true, get: function () { return otlp_http_1.OTLPHttp; } });
|
|
10
|
+
var otlp_kafka_1 = require("./otlp.kafka");
|
|
11
|
+
Object.defineProperty(exports, "OTLPKafka", { enumerable: true, get: function () { return otlp_kafka_1.OTLPKafka; } });
|
|
12
|
+
var otlp_nestjs_1 = require("./otlp.nestjs");
|
|
13
|
+
Object.defineProperty(exports, "OTLPNestjs", { enumerable: true, get: function () { return otlp_nestjs_1.OTLPNestjs; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPAuto = void 0;
|
|
4
|
+
const auto_instrumentations_node_1 = require("@opentelemetry/auto-instrumentations-node");
|
|
5
|
+
class OTLPAuto {
|
|
6
|
+
static getInstrumentations() {
|
|
7
|
+
return (0, auto_instrumentations_node_1.getNodeAutoInstrumentations)();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OTLPAuto = OTLPAuto;
|
|
11
|
+
//# sourceMappingURL=otlp.auto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.auto.js","sourceRoot":"","sources":["../../src/modules/otlp.auto.ts"],"names":[],"mappings":";;;AAAA,0FAAwF;AAExF,MAAa,QAAQ;IACZ,MAAM,CAAC,mBAAmB;QAC/B,OAAO,IAAA,wDAA2B,GAAE,CAAC;IACvC,CAAC;CACF;AAJD,4BAIC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPexpress = void 0;
|
|
4
|
+
const instrumentation_express_1 = require("@opentelemetry/instrumentation-express");
|
|
5
|
+
class OTLPexpress {
|
|
6
|
+
static getInstrumentations() {
|
|
7
|
+
return new instrumentation_express_1.ExpressInstrumentation();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OTLPexpress = OTLPexpress;
|
|
11
|
+
//# sourceMappingURL=otlp.express.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.express.js","sourceRoot":"","sources":["../../src/modules/otlp.express.ts"],"names":[],"mappings":";;;AAAA,oFAAgF;AAEhF,MAAa,WAAW;IACf,MAAM,CAAC,mBAAmB;QAC/B,OAAO,IAAI,gDAAsB,EAAE,CAAC;IACtC,CAAC;CACF;AAJD,kCAIC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPHttp = void 0;
|
|
4
|
+
const instrumentation_http_1 = require("@opentelemetry/instrumentation-http");
|
|
5
|
+
class OTLPHttp {
|
|
6
|
+
static getInstrumentations() {
|
|
7
|
+
return new instrumentation_http_1.HttpInstrumentation();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OTLPHttp = OTLPHttp;
|
|
11
|
+
//# sourceMappingURL=otlp.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.http.js","sourceRoot":"","sources":["../../src/modules/otlp.http.ts"],"names":[],"mappings":";;;AAAA,8EAA0E;AAE1E,MAAa,QAAQ;IACZ,MAAM,CAAC,mBAAmB;QAC/B,OAAO,IAAI,0CAAmB,EAAE,CAAC;IACnC,CAAC;CACF;AAJD,4BAIC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPKafka = void 0;
|
|
4
|
+
const opentelemetry_instrumentation_kafkajs_1 = require("opentelemetry-instrumentation-kafkajs");
|
|
5
|
+
function addGenericTag(span, topic, message) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
7
|
+
if (topic) {
|
|
8
|
+
span.setAttribute("message.topic", topic);
|
|
9
|
+
}
|
|
10
|
+
if (message.key) {
|
|
11
|
+
span.setAttribute("message.key", message.key.toString());
|
|
12
|
+
}
|
|
13
|
+
if (message.partition) {
|
|
14
|
+
span.setAttribute("message.partition", message.partition);
|
|
15
|
+
}
|
|
16
|
+
if (message.headers) {
|
|
17
|
+
Object.keys(message.headers).forEach((header) => {
|
|
18
|
+
span.setAttribute("message.header." + header, message.headers[header].toString());
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (message.value) {
|
|
22
|
+
const valueMessage = JSON.parse(message.value.toString());
|
|
23
|
+
if ((_a = valueMessage.header) === null || _a === void 0 ? void 0 : _a.session) {
|
|
24
|
+
span.setAttribute("message.session", (_b = valueMessage.header) === null || _b === void 0 ? void 0 : _b.session);
|
|
25
|
+
}
|
|
26
|
+
if ((_c = valueMessage.header) === null || _c === void 0 ? void 0 : _c.transaction) {
|
|
27
|
+
span.setAttribute("message.transaction", (_d = valueMessage.header) === null || _d === void 0 ? void 0 : _d.transaction);
|
|
28
|
+
}
|
|
29
|
+
if ((_e = valueMessage.header) === null || _e === void 0 ? void 0 : _e.from) {
|
|
30
|
+
span.setAttribute("message.from", (_f = valueMessage.header) === null || _f === void 0 ? void 0 : _f.from);
|
|
31
|
+
}
|
|
32
|
+
if ((_g = valueMessage.header) === null || _g === void 0 ? void 0 : _g.communication) {
|
|
33
|
+
span.setAttribute("message.communication", (_h = valueMessage.header) === null || _h === void 0 ? void 0 : _h.communication);
|
|
34
|
+
}
|
|
35
|
+
if ((_j = valueMessage.header) === null || _j === void 0 ? void 0 : _j.useCase) {
|
|
36
|
+
span.setAttribute("message.useCase", (_k = valueMessage.header) === null || _k === void 0 ? void 0 : _k.useCase);
|
|
37
|
+
}
|
|
38
|
+
if ((_l = valueMessage.header) === null || _l === void 0 ? void 0 : _l.useCaseStep) {
|
|
39
|
+
span.setAttribute("message.useCaseStep", (_m = valueMessage.header) === null || _m === void 0 ? void 0 : _m.useCaseStep);
|
|
40
|
+
}
|
|
41
|
+
if ((_o = valueMessage.header) === null || _o === void 0 ? void 0 : _o.useCaseAge) {
|
|
42
|
+
span.setAttribute("message.useCaseAge", (_p = valueMessage.header) === null || _p === void 0 ? void 0 : _p.useCaseAge);
|
|
43
|
+
}
|
|
44
|
+
if ((_q = valueMessage.header) === null || _q === void 0 ? void 0 : _q.channel) {
|
|
45
|
+
span.setAttribute("message.channel", (_r = valueMessage.header) === null || _r === void 0 ? void 0 : _r.channel);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function producerHook(span, topic, message) {
|
|
50
|
+
console.log(`producerHook Callback`);
|
|
51
|
+
span.setAttribute("message.direction", "produce");
|
|
52
|
+
addGenericTag(span, topic, message);
|
|
53
|
+
}
|
|
54
|
+
function consumerHook(span, topic, message) {
|
|
55
|
+
console.log(`consumerHook Callback`);
|
|
56
|
+
span.setAttribute("message.direction", "consume");
|
|
57
|
+
addGenericTag(span, topic, message);
|
|
58
|
+
}
|
|
59
|
+
class OTLPKafka {
|
|
60
|
+
static getInstrumentations() {
|
|
61
|
+
return new opentelemetry_instrumentation_kafkajs_1.KafkaJsInstrumentation({
|
|
62
|
+
producerHook: producerHook,
|
|
63
|
+
consumerHook: consumerHook,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.OTLPKafka = OTLPKafka;
|
|
68
|
+
//# sourceMappingURL=otlp.kafka.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.kafka.js","sourceRoot":"","sources":["../../src/modules/otlp.kafka.ts"],"names":[],"mappings":";;;AACA,iGAA+E;AAE/E,SAAS,aAAa,CAAC,IAAU,EAAE,KAAa,EAAE,OAAY;;IAC5D,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,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mBAAmB,EAAE,SAAS,CAAC,CAAC;IAClD,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,MAAa,SAAS;IACb,MAAM,CAAC,mBAAmB;QAC/B,OAAO,IAAI,8DAAsB,CAAC;YAChC,YAAY,EAAE,YAAY;YAC1B,YAAY,EAAE,YAAY;SAC3B,CAAC,CAAC;IACL,CAAC;CACF;AAPD,8BAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OTLPNestjs = void 0;
|
|
4
|
+
const instrumentation_nestjs_core_1 = require("@opentelemetry/instrumentation-nestjs-core");
|
|
5
|
+
class OTLPNestjs {
|
|
6
|
+
static getInstrumentations() {
|
|
7
|
+
return new instrumentation_nestjs_core_1.NestInstrumentation();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.OTLPNestjs = OTLPNestjs;
|
|
11
|
+
//# sourceMappingURL=otlp.nestjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.nestjs.js","sourceRoot":"","sources":["../../src/modules/otlp.nestjs.ts"],"names":[],"mappings":";;;AAAA,4FAAiF;AAEjF,MAAa,UAAU;IACd,MAAM,CAAC,mBAAmB;QAC/B,OAAO,IAAI,iDAAmB,EAAE,CAAC;IACnC,CAAC;CACF;AAJD,gCAIC"}
|
package/dist/otlp.app.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.eqxOtlp = void 0;
|
|
4
|
+
const opentelemetry = require("@opentelemetry/sdk-node");
|
|
5
|
+
const exporter_trace_otlp_proto_1 = require("@opentelemetry/exporter-trace-otlp-proto");
|
|
6
|
+
const exporter_metrics_otlp_proto_1 = require("@opentelemetry/exporter-metrics-otlp-proto");
|
|
7
|
+
const sdk_metrics_1 = require("@opentelemetry/sdk-metrics");
|
|
8
|
+
const monitor_opentelemetry_exporter_1 = require("@azure/monitor-opentelemetry-exporter");
|
|
9
|
+
const modules_1 = require("./modules");
|
|
10
|
+
let traceExporter;
|
|
11
|
+
let mettricExporter;
|
|
12
|
+
if (process.env.APPLICATIONINSIGHTS_CONNECTION_STRING) {
|
|
13
|
+
traceExporter = new monitor_opentelemetry_exporter_1.AzureMonitorTraceExporter({
|
|
14
|
+
connectionString: process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"],
|
|
15
|
+
});
|
|
16
|
+
mettricExporter = new sdk_metrics_1.PeriodicExportingMetricReader({
|
|
17
|
+
exporter: new monitor_opentelemetry_exporter_1.AzureMonitorMetricExporter({
|
|
18
|
+
connectionString: process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"],
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
traceExporter = new exporter_trace_otlp_proto_1.OTLPTraceExporter({
|
|
24
|
+
url: process.env.TRACES_URL || "http://172.17.0.1:4318/v1/traces",
|
|
25
|
+
headers: {},
|
|
26
|
+
});
|
|
27
|
+
mettricExporter = new sdk_metrics_1.PeriodicExportingMetricReader({
|
|
28
|
+
exporter: new exporter_metrics_otlp_proto_1.OTLPMetricExporter({
|
|
29
|
+
url: process.env.METRICS || "http://172.17.0.1:4318/v1/metrics",
|
|
30
|
+
headers: {},
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
let instrumentations = [];
|
|
35
|
+
let instrumentationEnabled = ["all"];
|
|
36
|
+
if (process.env.EQX_INSTRUMENTATIONS) {
|
|
37
|
+
instrumentationEnabled = process.env.EQX_INSTRUMENTATIONS.split(",");
|
|
38
|
+
}
|
|
39
|
+
if (instrumentationEnabled.includes("auto")) {
|
|
40
|
+
instrumentations.push(modules_1.OTLPAuto.getInstrumentations());
|
|
41
|
+
}
|
|
42
|
+
if (instrumentationEnabled.includes("all") ||
|
|
43
|
+
instrumentationEnabled.includes("express")) {
|
|
44
|
+
instrumentations.push(modules_1.OTLPexpress.getInstrumentations());
|
|
45
|
+
}
|
|
46
|
+
if (instrumentationEnabled.includes("all") ||
|
|
47
|
+
instrumentationEnabled.includes("http")) {
|
|
48
|
+
instrumentations.push(modules_1.OTLPHttp.getInstrumentations());
|
|
49
|
+
}
|
|
50
|
+
if (instrumentationEnabled.includes("all") ||
|
|
51
|
+
instrumentationEnabled.includes("kafka")) {
|
|
52
|
+
instrumentations.push(modules_1.OTLPKafka.getInstrumentations());
|
|
53
|
+
}
|
|
54
|
+
if (instrumentationEnabled.includes("all") ||
|
|
55
|
+
instrumentationEnabled.includes("nestjs")) {
|
|
56
|
+
instrumentations.push(modules_1.OTLPNestjs.getInstrumentations());
|
|
57
|
+
}
|
|
58
|
+
exports.eqxOtlp = new opentelemetry.NodeSDK({
|
|
59
|
+
traceExporter: traceExporter,
|
|
60
|
+
metricReader: mettricExporter,
|
|
61
|
+
instrumentations: instrumentations,
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=otlp.app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otlp.app.js","sourceRoot":"","sources":["../src/otlp.app.ts"],"names":[],"mappings":";;;AACA,yDAAyD;AACzD,wFAA6E;AAC7E,4FAAgF;AAChF,4DAA2E;AAC3E,0FAG+C;AAE/C,uCAMmB;AAEnB,IAAI,aAAkB,CAAC;AACvB,IAAI,eAAoB,CAAC;AAEzB,IAAI,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,CAAC;IACtD,aAAa,GAAG,IAAI,0DAAyB,CAAC;QAC5C,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC;KACvE,CAAC,CAAC;IACH,eAAe,GAAG,IAAI,2CAA6B,CAAC;QAClD,QAAQ,EAAE,IAAI,2DAA0B,CAAC;YACvC,gBAAgB,EAAE,OAAO,CAAC,GAAG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AQ,CAAC,KAAK,CAAC;IACtC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,EACxC,CAAC;IACD,gBAAgB,CAAC,IAAI,CAAC,mBAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACzD,CAAC;AACD,IACE,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC;IACtC,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACzC,CAAC;IACD,gBAAgB,CAAC,IAAI,CAAC,oBAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAC1D,CAAC;AAEY,QAAA,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC;IAC/C,aAAa,EAAE,aAAa;IAC5B,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,gBAAgB;CACnC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setSpanToM1 = void 0;
|
|
4
|
+
const m2_common_1 = require("./m2.common");
|
|
5
|
+
function setSpanToM1(span, m1Message) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
7
|
+
if ((_a = m1Message.protocol) === null || _a === void 0 ? void 0 : _a.version) {
|
|
8
|
+
span.setAttribute("M1.protocol.version", (_b = m1Message.protocol) === null || _b === void 0 ? void 0 : _b.version);
|
|
9
|
+
}
|
|
10
|
+
if ((_c = m1Message.protocol) === null || _c === void 0 ? void 0 : _c.command) {
|
|
11
|
+
span.setAttribute("M1.protocol.command", (_d = m1Message.protocol) === null || _d === void 0 ? void 0 : _d.command);
|
|
12
|
+
}
|
|
13
|
+
if ((_e = m1Message.protocol) === null || _e === void 0 ? void 0 : _e.subCommand) {
|
|
14
|
+
span.setAttribute("M1.protocol.sub_command", (_f = m1Message.protocol) === null || _f === void 0 ? void 0 : _f.subCommand);
|
|
15
|
+
}
|
|
16
|
+
if ((_g = m1Message.protocol) === null || _g === void 0 ? void 0 : _g.invoke) {
|
|
17
|
+
span.setAttribute("M1.protocol.invoke", (_h = m1Message.protocol) === null || _h === void 0 ? void 0 : _h.invoke);
|
|
18
|
+
}
|
|
19
|
+
if ((_j = m1Message.protocol) === null || _j === void 0 ? void 0 : _j.topic) {
|
|
20
|
+
span.setAttribute("M1.protocol.topic", (_k = m1Message.protocol) === null || _k === void 0 ? void 0 : _k.topic);
|
|
21
|
+
}
|
|
22
|
+
(0, m2_common_1.setSpanToM2)(span, m1Message);
|
|
23
|
+
}
|
|
24
|
+
exports.setSpanToM1 = setSpanToM1;
|
|
25
|
+
//# sourceMappingURL=m1.common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m1.common.js","sourceRoot":"","sources":["../../../../src/tracer/modules/common/m1.common.ts"],"names":[],"mappings":";;;AAEA,2CAA0C;AAE1C,SAAgB,WAAW,CAAC,IAAU,EAAE,SAAkB;;IACxD,IAAI,MAAA,SAAS,CAAC,QAAQ,0CAAE,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,MAAA,SAAS,CAAC,QAAQ,0CAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,MAAA,SAAS,CAAC,QAAQ,0CAAE,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,MAAA,SAAS,CAAC,QAAQ,0CAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,MAAA,SAAS,CAAC,QAAQ,0CAAE,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC,YAAY,CACf,yBAAyB,EACzB,MAAA,SAAS,CAAC,QAAQ,0CAAE,UAAU,CAC/B,CAAC;IACJ,CAAC;IACD,IAAI,MAAA,SAAS,CAAC,QAAQ,0CAAE,MAAM,EAAE,CAAC;QAC/B,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,MAAA,SAAS,CAAC,QAAQ,0CAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,CAAC,CAAC;IACpE,CAAC;IACD,IAAA,uBAAW,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC/B,CAAC;AApBD,kCAoBC"}
|