@golemio/core 1.2.9-dev.530956955 → 1.2.9-dev.535201370

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/README.md CHANGED
@@ -1,11 +1,33 @@
1
- [![pipeline status](https://gitlab.com/operator-ict/golemio/code/modules/core/badges/master/pipeline.svg)](https://gitlab.com/operator-ict/golemio/code/modules/core/commits/master)
2
- [![coverage report](https://gitlab.com/operator-ict/golemio/code/modules/core/badges/master/coverage.svg)](https://gitlab.com/operator-ict/golemio/code/modules/core/commits/master)
3
-
4
- # @golemio/core
5
-
6
- Core module of the Golemio data platform
7
-
8
- Developed by http://operatorict.cz
1
+ <div align="center">
2
+ <p>
3
+ <a href="https://operatorict.cz">
4
+ <img src="./.assets/oict_logo.png" alt="oict" width="100px" height="100px" />
5
+ </a>
6
+ <a href="https://golemio.cz">
7
+ <img src="./.assets/golemio_logo.png" alt="golemio" width="100px" height="100px" />
8
+ </a>
9
+ </p>
10
+
11
+ <h1>@golemio/core</h1>
12
+
13
+ <p>
14
+ <a href="https://gitlab.com/operator-ict/golemio/code/modules/core/commits/master">
15
+ <img src="https://gitlab.com/operator-ict/golemio/code/modules/core/badges/master/pipeline.svg" alt="pipeline">
16
+ </a>
17
+ <a href="https://gitlab.com/operator-ict/golemio/code/modules/core/commits/master">
18
+ <img src="https://gitlab.com/operator-ict/golemio/code/modules/core/badges/master/coverage.svg" alt="coverage">
19
+ </a>
20
+ <a href="./LICENSE">
21
+ <img src="https://img.shields.io/npm/l/@golemio/core" alt="license">
22
+ </a>
23
+ </p>
24
+
25
+ <p>
26
+ <a href="#installation">Installation</a> · <a href="./docs">Documentation</a> · <a href="https://operator-ict.gitlab.io/golemio/code/modules/core">TypeDoc</a>
27
+ </p>
28
+ </div>
29
+
30
+ This module is intended for use with Golemio services.
9
31
 
10
32
  ## Prerequisites
11
33
 
@@ -37,21 +59,25 @@ To compile typescript code into js one-time
37
59
  ```bash
38
60
  yarn run build
39
61
  ```
62
+
40
63
  or run this, to watch all changes
64
+
41
65
  ```bash
42
66
  yarn run build-watch
43
67
  ```
44
- from the application's root directory.
45
68
 
69
+ from the application's root directory.
46
70
 
47
71
  ## Usage
48
72
 
49
73
  In your project's `package.json` set dependency to @golemio/core
74
+
50
75
  ```bash
51
76
  yarn add @golemio/core --save
52
77
  ```
53
78
 
54
79
  Then import module, e.g.
80
+
55
81
  ```ts
56
82
  import * as core from "@golemio/core";
57
83
  ```
@@ -61,17 +87,22 @@ import * as core from "@golemio/core";
61
87
  For the local development use the [yarn link]() to link the @golemio/core with other service e.g. `@golemio/integration-engine` or module e.g. `@golemio/pid`.
62
88
 
63
89
  At the @golemio/core root directory:
90
+
64
91
  ```bash
65
92
  yarn link
66
93
  yarn build-watch
67
94
  ```
95
+
68
96
  At the @golemio/pid root directory:
97
+
69
98
  ```bash
70
99
  yarn link "@golemio/core"
71
100
  yarn link
72
101
  yarn build-watch
73
102
  ```
103
+
74
104
  At the @golemio/integration-engine root directory:
105
+
75
106
  ```bash
76
107
  yarn link "@golemio/core"
77
108
  yarn link "@golemio/pid"
@@ -90,7 +121,6 @@ yarn test
90
121
 
91
122
  from the application's root directory. All tests should pass.
92
123
 
93
-
94
124
  ## Rabbit MQ
95
125
 
96
126
  Core module defines main exchange in rabbit mq and its name is dependent on .env setting. Also it contains definition of queue for dead messages. All other queues are defined in separate modules and loaded dynamically by `QueueProcessor.ts`.
@@ -1,2 +1,2 @@
1
- import { AmqplibInstrumentationConfig } from "opentelemetry-instrumentation-amqplib";
1
+ import { AmqplibInstrumentationConfig } from "@opentelemetry/instrumentation-amqplib";
2
2
  export declare const amqplibConfig: AmqplibInstrumentationConfig;
@@ -3,15 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.amqplibConfig = void 0;
4
4
  const helpers_1 = require("../helpers");
5
5
  const extended_attributes_1 = require("../extended-attributes");
6
- const amqplibConsumeEndHook = (span, _msg, _rejected, endOperation) => {
7
- span.setAttribute(extended_attributes_1.AmqplibExtendedAttribute.CONSUME_END_OPERATION, endOperation);
6
+ const amqplibConsumeEndHook = (span, consumeEndInfo) => {
7
+ span.setAttribute(extended_attributes_1.AmqplibExtendedAttribute.CONSUME_END_OPERATION, consumeEndInfo.endOperation);
8
8
  };
9
- const amqplibPublishCustomAttributeFunction = (span, publishParams) => {
10
- const module = publishParams.routingKey.split(".").slice(-2, -1)[0];
9
+ const amqplibPublishCustomAttributeFunction = (span, publishInfo) => {
10
+ const module = publishInfo.routingKey.split(".").slice(-2, -1)[0];
11
11
  span.setAttribute("service.module", module);
12
12
  };
13
- const amqplibConsumerCustomAttributeFunction = (span, msg) => {
14
- const module = msg === null || msg === void 0 ? void 0 : msg.fields.routingKey.split(".").slice(-2, -1)[0];
13
+ const amqplibConsumerCustomAttributeFunction = (span, consumeInfo) => {
14
+ var _a;
15
+ const module = (_a = consumeInfo.msg) === null || _a === void 0 ? void 0 : _a.fields.routingKey.split(".").slice(-2, -1)[0];
15
16
  if (module) {
16
17
  span.setAttribute("service.module", module);
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"amqplib.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/amqplib.ts"],"names":[],"mappings":";;;AASA,wCAA+C;AAC/C,gEAAkE;AAElE,MAAM,qBAAqB,GAA8C,CACrE,IAAU,EACV,IAA2B,EAC3B,SAAkB,EAClB,YAA0B,EACtB,EAAE;IACN,IAAI,CAAC,YAAY,CAAC,8CAAwB,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;AACpF,CAAC,CAAC;AAEF,MAAM,qCAAqC,GAA0C,CACjF,IAAU,EACV,aAA4B,EACxB,EAAE;IACN,MAAM,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,sCAAsC,GAA2C,CACnF,IAAU,EACV,GAA0B,EACtB,EAAE;IACN,MAAM,MAAM,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,IAAI,MAAM,EAAE;QACR,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;KAC/C;AACL,CAAC,CAAC;AAEW,QAAA,aAAa,GAAiC;IACvD,WAAW,EAAE,IAAA,2BAAiB,EAAC,sCAAsC,CAAC;IACtE,WAAW,EAAE,IAAA,2BAAiB,EAAC,qCAAqC,CAAC;IACrE,cAAc,EAAE,IAAA,2BAAiB,EAAC,qBAAqB,CAAC;CAC3D,CAAC"}
1
+ {"version":3,"file":"amqplib.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/amqplib.ts"],"names":[],"mappings":";;;AAUA,wCAA+C;AAC/C,gEAAkE;AAElE,MAAM,qBAAqB,GAA6C,CAAC,IAAU,EAAE,cAA8B,EAAQ,EAAE;IACzH,IAAI,CAAC,YAAY,CAAC,8CAAwB,CAAC,qBAAqB,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,qCAAqC,GAA0C,CACjF,IAAU,EACV,WAAwB,EACpB,EAAE;IACN,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,sCAAsC,GAA0C,CAClF,IAAU,EACV,WAEC,EACG,EAAE;;IACN,MAAM,MAAM,GAAG,MAAA,WAAW,CAAC,GAAG,0CAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9E,IAAI,MAAM,EAAE;QACR,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;KAC/C;AACL,CAAC,CAAC;AAEW,QAAA,aAAa,GAAiC;IACvD,WAAW,EAAE,IAAA,2BAAiB,EAAC,sCAAsC,CAAC;IACtE,WAAW,EAAE,IAAA,2BAAiB,EAAC,qCAAqC,CAAC;IACrE,cAAc,EAAE,IAAA,2BAAiB,EAAC,qBAAqB,CAAC;CAC3D,CAAC"}
@@ -1,2 +1,2 @@
1
- import { AwsSdkInstrumentationConfig } from "opentelemetry-instrumentation-aws-sdk";
1
+ import { AwsSdkInstrumentationConfig } from "@opentelemetry/instrumentation-aws-sdk";
2
2
  export declare const awsSdkConfig: AwsSdkInstrumentationConfig;
@@ -18,8 +18,8 @@ const getWhitelistedParams = (serviceName, requestParams) => {
18
18
  return whiteList;
19
19
  }, {});
20
20
  };
21
- const awsSdkPreRequestHook = (span, request) => {
22
- const paramsToAttach = getWhitelistedParams(request.serviceName, request.commandInput);
21
+ const awsSdkPreRequestHook = (span, requestInfo) => {
22
+ const paramsToAttach = getWhitelistedParams(requestInfo.request.serviceName, requestInfo.request.commandInput);
23
23
  if (paramsToAttach) {
24
24
  try {
25
25
  span.setAttribute(extended_attributes_1.AwsSdkExtendedAttribute.AWS_REQUEST_PARAMS, JSON.stringify(paramsToAttach));
@@ -1 +1 @@
1
- {"version":3,"file":"aws-sdk.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/aws-sdk.ts"],"names":[],"mappings":";;;AAGA,wCAA+C;AAC/C,gEAAiE;AAEjE,MAAM,sBAAsB,GAA6B;IACrD,EAAE,EAA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AK,EAAE,aAAa,EAAE,qBAAqB,CAAC;CAC9D,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,aAAkC,EAAmC,EAAE;IACtH,MAAM,MAAM,GAAa,sBAAsB,CAAC,WAAW,CAAC,CAAC;IAE7D,IAAI,CAAC,MAAM,IAAI,CAAC,aAAa;QAAE,OAAO;IAEtC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,SAA8B,EAAE,SAAiB,EAAE,EAAE;QACvE,MAAM,GAAG,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,GAAG,KAAK,SAAS,EAAE;YACnB,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC;SAC9B;QACD,OAAO,SAAS,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAyC,CAAC,IAAU,EAAE,WAAyC,EAAE,EAAE;IACzH,MAAM,cAAc,GAAG,oBAAoB,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/G,IAAI,cAAc,EAAE;QAChB,IAAI;YACA,IAAI,CAAC,YAAY,CAAC,6CAAuB,CAAC,kBAAkB,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;SACjG;QAAC,WAAM;YACJ,SAAS;SACZ;KACJ;AACL,CAAC,CAAC;AAEW,QAAA,YAAY,GAAgC;IACrD,cAAc,EAAE,IAAA,2BAAiB,EAAC,oBAAoB,CAAC;IACvD,+BAA+B,EAAE,IAAI;CACxC,CAAC"}
@@ -1,3 +1,2 @@
1
1
  import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http/build/src/types";
2
- import { InstrumentationConfig } from "@opentelemetry/instrumentation";
3
- export declare const httpConfig: HttpInstrumentationConfig & InstrumentationConfig;
2
+ export declare const httpConfig: HttpInstrumentationConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/http.ts"],"names":[],"mappings":";;;AAAA,+BAAsE;AAItE,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;AAEW,QAAA,UAAU,GAAsD;IACzE,2BAA2B,EAAE,IAAA,2BAAiB,EAAC,oBAAoB,CAAC;CACvE,CAAC"}
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;AAEW,QAAA,UAAU,GAA8B;IACjD,2BAA2B,EAAE,IAAA,2BAAiB,EAAC,oBAAoB,CAAC;CACvE,CAAC"}
@@ -4,6 +4,6 @@ import { RedisInstrumentation } from "@opentelemetry/instrumentation-redis";
4
4
  import { ExpressInstrumentation } from "@opentelemetry/instrumentation-express";
5
5
  import { SequelizeInstrumentation } from "opentelemetry-instrumentation-sequelize";
6
6
  import { MongooseInstrumentation } from "opentelemetry-instrumentation-mongoose";
7
- import { AmqplibInstrumentation } from "opentelemetry-instrumentation-amqplib";
8
- import { AwsInstrumentation } from "opentelemetry-instrumentation-aws-sdk";
7
+ import { AmqplibInstrumentation } from "@opentelemetry/instrumentation-amqplib";
8
+ import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk";
9
9
  export declare const getInstrumentation: () => (ExpressInstrumentation | HttpInstrumentation | SequelizeInstrumentation | MongooseInstrumentation | AmqplibInstrumentation | IORedisInstrumentation | RedisInstrumentation | AwsInstrumentation)[];
@@ -8,8 +8,8 @@ const instrumentation_redis_1 = require("@opentelemetry/instrumentation-redis");
8
8
  const instrumentation_express_1 = require("@opentelemetry/instrumentation-express");
9
9
  const opentelemetry_instrumentation_sequelize_1 = require("opentelemetry-instrumentation-sequelize");
10
10
  const opentelemetry_instrumentation_mongoose_1 = require("opentelemetry-instrumentation-mongoose");
11
- const opentelemetry_instrumentation_amqplib_1 = require("opentelemetry-instrumentation-amqplib");
12
- const opentelemetry_instrumentation_aws_sdk_1 = require("opentelemetry-instrumentation-aws-sdk");
11
+ const instrumentation_amqplib_1 = require("@opentelemetry/instrumentation-amqplib");
12
+ const instrumentation_aws_sdk_1 = require("@opentelemetry/instrumentation-aws-sdk");
13
13
  // Configs
14
14
  const configs_1 = require("./configs");
15
15
  const getInstrumentation = () => {
@@ -18,10 +18,10 @@ const getInstrumentation = () => {
18
18
  new instrumentation_http_1.HttpInstrumentation(configs_1.httpConfig),
19
19
  new opentelemetry_instrumentation_sequelize_1.SequelizeInstrumentation(configs_1.sequelizeConfig),
20
20
  new opentelemetry_instrumentation_mongoose_1.MongooseInstrumentation(configs_1.mongooseConfig),
21
- new opentelemetry_instrumentation_amqplib_1.AmqplibInstrumentation(configs_1.amqplibConfig),
21
+ new instrumentation_amqplib_1.AmqplibInstrumentation(configs_1.amqplibConfig),
22
22
  new instrumentation_ioredis_1.IORedisInstrumentation(),
23
23
  new instrumentation_redis_1.RedisInstrumentation(),
24
- new opentelemetry_instrumentation_aws_sdk_1.AwsInstrumentation(configs_1.awsSdkConfig),
24
+ new instrumentation_aws_sdk_1.AwsInstrumentation(configs_1.awsSdkConfig),
25
25
  ];
26
26
  };
27
27
  exports.getInstrumentation = getInstrumentation;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/monitoring/opentelemetry/instrumentation/index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,8EAA0E;AAC1E,oFAAgF;AAChF,gFAA4E;AAC5E,oFAAgF;AAChF,qGAAmF;AACnF,mGAAiF;AACjF,iGAA+E;AAC/E,iGAA2E;AAE3E,UAAU;AACV,uCAAqG;AAE9F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO;QACH,IAAI,gDAAsB,EAAE;QAC5B,IAAI,0CAAmB,CAAC,oBAAU,CAAC;QACnC,IAAI,kEAAwB,CAAC,yBAAe,CAAC;QAC7C,IAAI,gEAAuB,CAAC,wBAAc,CAAC;QAC3C,IAAI,8DAAsB,CAAC,uBAAa,CAAC;QACzC,IAAI,gDAAsB,EAAE;QAC5B,IAAI,4CAAoB,EAAE;QAC1B,IAAI,0DAAkB,CAAC,sBAAY,CAAC;KACvC,CAAC;AACN,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/monitoring/opentelemetry/instrumentation/index.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,8EAA0E;AAC1E,oFAAgF;AAChF,gFAA4E;AAC5E,oFAAgF;AAChF,qGAAmF;AACnF,mGAAiF;AACjF,oFAAgF;AAChF,oFAA4E;AAE5E,UAAU;AACV,uCAAqG;AAE9F,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,OAAO;QACH,IAAI,gDAAsB,EAAE;QAC5B,IAAI,0CAAmB,CAAC,oBAAU,CAAC;QACnC,IAAI,kEAAwB,CAAC,yBAAe,CAAC;QAC7C,IAAI,gEAAuB,CAAC,wBAAc,CAAC;QAC3C,IAAI,gDAAsB,CAAC,uBAAa,CAAC;QACzC,IAAI,gDAAsB,EAAE;QAC5B,IAAI,4CAAoB,EAAE;QAC1B,IAAI,4CAAkB,CAAC,sBAAY,CAAC;KACvC,CAAC;AACN,CAAC,CAAC;AAXW,QAAA,kBAAkB,sBAW7B"}
@@ -2,10 +2,10 @@
2
2
  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
- const node_1 = require("@opentelemetry/node");
5
+ const sdk_trace_node_1 = require("@opentelemetry/sdk-trace-node");
6
6
  const resources_1 = require("@opentelemetry/resources");
7
7
  const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
8
- const tracing_1 = require("@opentelemetry/tracing");
8
+ const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
9
9
  const exporter_jaeger_1 = require("@opentelemetry/exporter-jaeger");
10
10
  const api_1 = require("@opentelemetry/api");
11
11
  const instrumentation_2 = require("./instrumentation");
@@ -24,24 +24,24 @@ const initTraceProvider = (projectName, nodeEnv, config) => {
24
24
  else {
25
25
  api_1.diag.info(`Telemetry enabled (env: ${nodeEnv})`);
26
26
  }
27
- const provider = new node_1.NodeTracerProvider({
27
+ const provider = new sdk_trace_node_1.NodeTracerProvider({
28
28
  resource: new resources_1.Resource({
29
29
  [semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: projectName,
30
30
  }),
31
31
  });
32
32
  if (config.jaegerProcessor === JaegerProcessorType.CONSOLE || config.jaegerProcessor === JaegerProcessorType.BOTH) {
33
- provider.addSpanProcessor(new tracing_1.SimpleSpanProcessor(new tracing_1.ConsoleSpanExporter()));
33
+ provider.addSpanProcessor(new sdk_trace_base_1.SimpleSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter()));
34
34
  }
35
35
  if (config.jaegerProcessor === JaegerProcessorType.EXPORTER || config.jaegerProcessor === JaegerProcessorType.BOTH) {
36
36
  const options = config.jaegerEndpoint
37
37
  ? { endpoint: config.jaegerEndpoint }
38
38
  : Object.assign(Object.assign({}, (config.jaegerHost && { host: config.jaegerHost })), (config.jaegerPort && { port: config.jaegerPort }));
39
- provider.addSpanProcessor(new tracing_1.BatchSpanProcessor(new exporter_jaeger_1.JaegerExporter(options)));
39
+ provider.addSpanProcessor(new sdk_trace_base_1.BatchSpanProcessor(new exporter_jaeger_1.JaegerExporter(options)));
40
40
  }
41
41
  provider.register();
42
42
  (0, instrumentation_1.registerInstrumentations)({
43
43
  tracerProvider: provider,
44
- instrumentations: [(0, instrumentation_2.getInstrumentation)()],
44
+ instrumentations: (0, instrumentation_2.getInstrumentation)(),
45
45
  });
46
46
  };
47
47
  exports.initTraceProvider = initTraceProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"trace-provider.js","sourceRoot":"","sources":["../../../src/monitoring/opentelemetry/trace-provider.ts"],"names":[],"mappings":";;;AAAA,oEAA0E;AAC1E,8CAAyD;AACzD,wDAAoD;AACpD,8EAAiF;AACjF,oDAAsG;AACtG,oEAAgF;AAChF,4CAAwF;AACxF,uDAA+E;AAE/E,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;IACrB,oCAAa,CAAA;AACjB,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAWM,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,OAAe,EAAE,MA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AAK,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"}
@@ -8,7 +8,7 @@ const GetSubProperty = (path, obj) => {
8
8
  else {
9
9
  return path.split(".").reduce((prev, curr) => {
10
10
  return prev ? prev[curr] : undefined;
11
- }, obj || self);
11
+ }, obj);
12
12
  }
13
13
  };
14
14
  exports.GetSubProperty = GetSubProperty;
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../src/output-gateway/Utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,cAAc,GAAG,CAAI,IAAY,EAAE,GAAW,EAAK,EAAE;IAC9D,IAAI,IAAI,KAAK,EAAE,EAAE;QACb,OAAO,GAAmB,CAAC;KAC9B;SAAM;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,IAAS,EAAE,EAAE;YACnD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzC,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC;KACnB;AACL,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEF;;;;GAIG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAyB,EAAW,EAAE;IACzE,IAAI,KAAK,KAAK,SAAS,EAAE;QACrB,OAAO,KAAK,CAAC;KAChB;SAAM;QACH,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;KAC/D;AACL,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../src/output-gateway/Utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,cAAc,GAAG,CAAI,IAAY,EAAE,GAAW,EAAK,EAAE;IAC9D,IAAI,IAAI,KAAK,EAAE,EAAE;QACb,OAAO,GAAmB,CAAC;KAC9B;SAAM;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,IAAS,EAAE,EAAE;YACnD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACzC,CAAC,EAAE,GAAG,CAAC,CAAC;KACX;AACL,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEF;;;;GAIG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAyB,EAAW,EAAE;IACzE,IAAI,KAAK,KAAK,SAAS,EAAE;QACrB,OAAO,KAAK,CAAC;KAChB;SAAM;QACH,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;KAC/D;AACL,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/core",
3
- "version": "1.2.9-dev.530956955",
3
+ "version": "1.2.9-dev.535201370",
4
4
  "description": "Golemio Core Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -72,15 +72,18 @@
72
72
  "@golemio/utils": "^1.0.0",
73
73
  "@golemio/validator": "0.2.2",
74
74
  "@google-cloud/storage": "^5.18.0",
75
- "@opentelemetry/api": "^1.0.2",
76
- "@opentelemetry/exporter-jaeger": "^0.24.0",
77
- "@opentelemetry/instrumentation-express": "^0.24.0",
78
- "@opentelemetry/instrumentation-http": "^0.24.0",
79
- "@opentelemetry/instrumentation-ioredis": "^0.24.0",
80
- "@opentelemetry/instrumentation-redis": "^0.24.0",
81
- "@opentelemetry/node": "^0.24.0",
82
- "@opentelemetry/resources": "^0.24.0",
83
- "@opentelemetry/tracing": "^0.24.0",
75
+ "@opentelemetry/api": "^1.1.0",
76
+ "@opentelemetry/exporter-jaeger": "^1.2.0",
77
+ "@opentelemetry/instrumentation-amqplib": "^0.28.0",
78
+ "@opentelemetry/instrumentation-aws-sdk": "^0.6.0",
79
+ "@opentelemetry/instrumentation-express": "^0.28.0",
80
+ "@opentelemetry/instrumentation-http": "^0.27.0",
81
+ "@opentelemetry/instrumentation-ioredis": "^0.28.0",
82
+ "@opentelemetry/instrumentation-pg": "^0.28.0",
83
+ "@opentelemetry/instrumentation-redis": "^0.29.0",
84
+ "@opentelemetry/resources": "^1.2.0",
85
+ "@opentelemetry/sdk-trace-base": "^1.2.0",
86
+ "@opentelemetry/sdk-trace-node": "^1.2.0",
84
87
  "@sentry/node": "^6.11.0",
85
88
  "@sentry/tracing": "^6.11.0",
86
89
  "@types/express": "^4.16.0",
@@ -109,10 +112,8 @@
109
112
  "mongodb-restore-dump": "1.0.1",
110
113
  "mongoose": "^5.3.6",
111
114
  "morgan": "^1.10.0",
112
- "opentelemetry-instrumentation-amqplib": "^0.24.0",
113
- "opentelemetry-instrumentation-aws-sdk": "^0.24.1",
114
- "opentelemetry-instrumentation-mongoose": "^0.24.0",
115
- "opentelemetry-instrumentation-sequelize": "^0.24.0",
115
+ "opentelemetry-instrumentation-mongoose": "^0.27.1",
116
+ "opentelemetry-instrumentation-sequelize": "^0.27.1",
116
117
  "path-to-regexp": "^6.2.0",
117
118
  "pg": "^8.6.0",
118
119
  "prom-client": "^14.0.0",