@golemio/core 1.20.14 → 1.21.0-rc.1981488271
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/monitoring/opentelemetry/instrumentation/configs/http.js +1 -1
- package/dist/monitoring/opentelemetry/instrumentation/configs/http.js.map +1 -1
- package/dist/monitoring/opentelemetry/trace-provider.js +12 -9
- package/dist/monitoring/opentelemetry/trace-provider.js.map +1 -1
- package/dist/shared/amqplib.d.ts +1 -0
- package/dist/shared/amqplib.js +18 -0
- package/dist/shared/amqplib.js.map +1 -0
- package/package.json +14 -14
|
@@ -15,6 +15,6 @@ const httpCustomAttributes = (span, request, response) => {
|
|
|
15
15
|
const routeBlacklist = ["/live", "/ready", "health-check", "/status"];
|
|
16
16
|
exports.httpConfig = {
|
|
17
17
|
applyCustomAttributesOnSpan: (0, helpers_1.withRecordingSpan)(httpCustomAttributes),
|
|
18
|
-
|
|
18
|
+
ignoreIncomingRequestHook: (req) => routeBlacklist.some((el) => req.url?.endsWith(el)),
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=http.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/http.ts"],"names":[],"mappings":";;;AAAA,+BAAsE;AAGtE,wCAA+C;AAC/C,gEAA+D;AAE/D,MAAM,oBAAoB,GAAgC,CACtD,IAAU,EACV,OAAwC,EACxC,QAA0C,EACtC,EAAE;IACN,IAAI,OAAO,YAAY,oBAAa,EAAE;QAClC,IAAI,CAAC,YAAY,CAAC,2CAAqB,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;KACvG;IACD,IAAI,QAAQ,YAAY,sBAAe,EAAE;QACrC,IAAI,CAAC,YAAY,CAAC,2CAAqB,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;KACpG;AACL,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAEzD,QAAA,UAAU,GAA8B;IACjD,2BAA2B,EAAE,IAAA,2BAAiB,EAAC,oBAAoB,CAAC;IACpE,
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/http.ts"],"names":[],"mappings":";;;AAAA,+BAAsE;AAGtE,wCAA+C;AAC/C,gEAA+D;AAE/D,MAAM,oBAAoB,GAAgC,CACtD,IAAU,EACV,OAAwC,EACxC,QAA0C,EACtC,EAAE;IACN,IAAI,OAAO,YAAY,oBAAa,EAAE;QAClC,IAAI,CAAC,YAAY,CAAC,2CAAqB,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;KACvG;IACD,IAAI,QAAQ,YAAY,sBAAe,EAAE;QACrC,IAAI,CAAC,YAAY,CAAC,2CAAqB,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;KACpG;AACL,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAEzD,QAAA,UAAU,GAA8B;IACjD,2BAA2B,EAAE,IAAA,2BAAiB,EAAC,oBAAoB,CAAC;IACpE,yBAAyB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;CACzF,CAAC"}
|
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createChildSpan = exports.initTraceProvider = exports.JaegerProcessorType = void 0;
|
|
4
4
|
const instrumentation_1 = require("@opentelemetry/instrumentation");
|
|
5
5
|
const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
|
|
6
|
-
const resources_1 = require("@opentelemetry/resources");
|
|
7
6
|
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
8
7
|
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
9
8
|
const exporter_jaeger_1 = require("@opentelemetry/exporter-jaeger");
|
|
10
9
|
const api_1 = require("@opentelemetry/api");
|
|
11
10
|
const instrumentation_2 = require("./instrumentation");
|
|
11
|
+
const resources_1 = require("@opentelemetry/resources");
|
|
12
12
|
var JaegerProcessorType;
|
|
13
13
|
(function (JaegerProcessorType) {
|
|
14
14
|
JaegerProcessorType["CONSOLE"] = "CONSOLE";
|
|
@@ -30,6 +30,7 @@ const getTelemetryConfig = () => {
|
|
|
30
30
|
};
|
|
31
31
|
const initTraceProvider = () => {
|
|
32
32
|
const config = getTelemetryConfig();
|
|
33
|
+
const spanProcessors = [];
|
|
33
34
|
api_1.diag.setLogger(new api_1.DiagConsoleLogger(), config.diagLogLevel);
|
|
34
35
|
if (!config.jaegerEnabled) {
|
|
35
36
|
api_1.diag.info(`Telemetry disabled (service: ${config.jaegerServiceName})`);
|
|
@@ -38,14 +39,8 @@ const initTraceProvider = () => {
|
|
|
38
39
|
else {
|
|
39
40
|
api_1.diag.info(`Telemetry enabled (service: ${config.jaegerServiceName})`);
|
|
40
41
|
}
|
|
41
|
-
const provider = new sdk_trace_node_1.NodeTracerProvider({
|
|
42
|
-
resource: new resources_1.Resource({
|
|
43
|
-
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: process.env.APP_NAME,
|
|
44
|
-
...(process.env.NODE_ENV && { [semantic_conventions_1.SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: process.env.NODE_ENV }),
|
|
45
|
-
}),
|
|
46
|
-
});
|
|
47
42
|
if (config.jaegerProcessor === JaegerProcessorType.CONSOLE || config.jaegerProcessor === JaegerProcessorType.BOTH) {
|
|
48
|
-
|
|
43
|
+
spanProcessors.push(new sdk_trace_base_1.SimpleSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter()));
|
|
49
44
|
}
|
|
50
45
|
if (config.jaegerProcessor === JaegerProcessorType.EXPORTER || config.jaegerProcessor === JaegerProcessorType.BOTH) {
|
|
51
46
|
const options = config.jaegerEndpoint
|
|
@@ -54,8 +49,16 @@ const initTraceProvider = () => {
|
|
|
54
49
|
...(config.jaegerHost && { host: config.jaegerHost }),
|
|
55
50
|
...(config.jaegerPort && { port: config.jaegerPort }),
|
|
56
51
|
};
|
|
57
|
-
|
|
52
|
+
const spanExporter = new exporter_jaeger_1.JaegerExporter(options);
|
|
53
|
+
spanProcessors.push(new sdk_trace_base_1.BatchSpanProcessor(spanExporter));
|
|
58
54
|
}
|
|
55
|
+
const provider = new sdk_trace_node_1.NodeTracerProvider({
|
|
56
|
+
resource: (0, resources_1.resourceFromAttributes)({
|
|
57
|
+
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: process.env.APP_NAME,
|
|
58
|
+
...(process.env.NODE_ENV && { [semantic_conventions_1.SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: process.env.NODE_ENV }),
|
|
59
|
+
}),
|
|
60
|
+
spanProcessors,
|
|
61
|
+
});
|
|
59
62
|
provider.register();
|
|
60
63
|
(0, instrumentation_1.registerInstrumentations)({
|
|
61
64
|
tracerProvider: provider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace-provider.js","sourceRoot":"","sources":["../../../src/monitoring/opentelemetry/trace-provider.ts"],"names":[],"mappings":";;;AAAA,oEAA0E;AAC1E,kEAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"trace-provider.js","sourceRoot":"","sources":["../../../src/monitoring/opentelemetry/trace-provider.ts"],"names":[],"mappings":";;;AAAA,oEAA0E;AAC1E,kEAAmE;AACn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AAC,QAAQ,IAAI,EAAE,CAAC,iDAA0B,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;SAC7G,CAAC;QACF,cAAc;KACjB,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAEpB,IAAA,0CAAwB,EAAC;QACrB,cAAc,EAAE,QAAQ;QACxB,gBAAgB,EAAE,IAAA,oCAAkB,GAAE;KACzC,CAAC,CAAC;AACP,CAAC,CAAC;AAvCW,QAAA,iBAAiB,qBAuC5B;AAEK,MAAM,eAAe,GAAG,CAAC,QAAgB,EAAoB,EAAE;IAClE,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,CAAC,EAAE;QAC1C,OAAO;KACV;IACD,MAAM,MAAM,GAAG,WAAK,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtC,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "amqplib";
|
|
@@ -0,0 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("amqplib"), exports);
|
|
18
|
+
//# sourceMappingURL=amqplib.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amqplib.js","sourceRoot":"","sources":["../../src/shared/amqplib.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0-rc.1981488271",
|
|
4
4
|
"description": "Golemio Core Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"@commitlint/cli": "^19.3.0",
|
|
32
32
|
"@commitlint/config-conventional": "^16.2.1",
|
|
33
33
|
"@golemio/eslint-config": "1.1.2",
|
|
34
|
-
"@types/amqplib": "^0.5.17",
|
|
35
34
|
"@types/chai": "4.2.3",
|
|
36
35
|
"@types/chai-as-promised": "7.1.2",
|
|
37
36
|
"@types/content-type": "^1.1.3",
|
|
@@ -74,22 +73,23 @@
|
|
|
74
73
|
"@golemio/errors": "2.0.6",
|
|
75
74
|
"@golemio/validator": "0.3.5",
|
|
76
75
|
"@google-cloud/storage": "^7.16.0",
|
|
77
|
-
"@opentelemetry/api": "^1.0
|
|
78
|
-
"@opentelemetry/exporter-jaeger": "^
|
|
79
|
-
"@opentelemetry/instrumentation-amqplib": "^0.
|
|
80
|
-
"@opentelemetry/instrumentation-aws-sdk": "^0.
|
|
81
|
-
"@opentelemetry/instrumentation-express": "^0.
|
|
82
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
83
|
-
"@opentelemetry/instrumentation-ioredis": "^0.
|
|
84
|
-
"@opentelemetry/resources": "^
|
|
85
|
-
"@opentelemetry/sdk-trace-base": "^
|
|
86
|
-
"@opentelemetry/sdk-trace-node": "^
|
|
76
|
+
"@opentelemetry/api": "^1.9.0",
|
|
77
|
+
"@opentelemetry/exporter-jaeger": "^2.0.1",
|
|
78
|
+
"@opentelemetry/instrumentation-amqplib": "^0.50.0",
|
|
79
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.56.0",
|
|
80
|
+
"@opentelemetry/instrumentation-express": "^0.52.0",
|
|
81
|
+
"@opentelemetry/instrumentation-http": "^0.203.0",
|
|
82
|
+
"@opentelemetry/instrumentation-ioredis": "^0.51.0",
|
|
83
|
+
"@opentelemetry/resources": "^2.0.1",
|
|
84
|
+
"@opentelemetry/sdk-trace-base": "^2.0.1",
|
|
85
|
+
"@opentelemetry/sdk-trace-node": "^2.0.1",
|
|
86
|
+
"@types/amqplib": "^0.10.7",
|
|
87
87
|
"@types/express": "^4.17.21",
|
|
88
88
|
"@types/geojson": "^7946.0.10",
|
|
89
89
|
"@types/luxon": "^2.3.1",
|
|
90
90
|
"@types/qs": "^6.9.18",
|
|
91
91
|
"ajv": "^8.10.0",
|
|
92
|
-
"amqplib": "^0.
|
|
92
|
+
"amqplib": "^0.10.8",
|
|
93
93
|
"apicache-plus": "^2.3.1",
|
|
94
94
|
"basic-ftp": "^5.0.2",
|
|
95
95
|
"class-transformer": "^0.5.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"lightship": "^6.7.2",
|
|
109
109
|
"luxon": "^2.5.2",
|
|
110
110
|
"moment-timezone": "^0.5.26",
|
|
111
|
-
"opentelemetry-instrumentation-sequelize": "^0.
|
|
111
|
+
"opentelemetry-instrumentation-sequelize": "^0.41.0",
|
|
112
112
|
"path-to-regexp": "^8.1.0",
|
|
113
113
|
"pg": "^8.6.0",
|
|
114
114
|
"pino": "^8.17.2",
|