@yolo-croket-dev/core 1.7.4-datadog.0 → 1.7.4-datadog.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.
|
@@ -31,9 +31,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
31
31
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
32
32
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
33
33
|
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
35
|
exports.RPCInterceptor = void 0;
|
|
39
36
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -43,7 +40,6 @@ const core_1 = require("@nestjs/core");
|
|
|
43
40
|
const rxjs_1 = require("rxjs");
|
|
44
41
|
const operators_1 = require("rxjs/operators");
|
|
45
42
|
const msa_logger_1 = __importStar(require("@yolo-croket-dev/msa-logger"));
|
|
46
|
-
const dd_trace_1 = __importDefault(require("dd-trace"));
|
|
47
43
|
// import Logger from '@yolo-croket-dev/logger';
|
|
48
44
|
const functions_1 = require("../functions");
|
|
49
45
|
const exceptions_1 = require("../exceptions");
|
|
@@ -185,7 +181,7 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
185
181
|
}
|
|
186
182
|
const noAck = message.fields.routingKey.includes('ASYNC');
|
|
187
183
|
let localErrorProcessor = async (err) => {
|
|
188
|
-
var _a
|
|
184
|
+
var _a;
|
|
189
185
|
const errMsg = err.response ? err.response : err.message;
|
|
190
186
|
const status = err.status ? err.status : 500;
|
|
191
187
|
const errType = err.errType;
|
|
@@ -194,9 +190,6 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
194
190
|
const errInfo = err.errInfo;
|
|
195
191
|
const duration = Date.now() - now;
|
|
196
192
|
let isAck = false;
|
|
197
|
-
if (process.env.DD_AGENT_HOST && process.env.DD_AGENT_HOST.startsWith('datadog-agent-agent')) {
|
|
198
|
-
(_a = dd_trace_1.default.scope().active()) === null || _a === void 0 ? void 0 : _a.setTag('error', err);
|
|
199
|
-
}
|
|
200
193
|
/** 파일 객체 처리 */
|
|
201
194
|
(0, functions_1.reWriteFileValue)(arg === null || arg === void 0 ? void 0 : arg.file);
|
|
202
195
|
const abstractAmqpHandlerData = {
|
|
@@ -240,7 +233,8 @@ let RPCInterceptor = class RPCInterceptor {
|
|
|
240
233
|
}
|
|
241
234
|
const messageContent = message.content.toString();
|
|
242
235
|
/** 파일 객체 처리 */
|
|
243
|
-
(0, functions_1.reWriteFileValue)((
|
|
236
|
+
(0, functions_1.reWriteFileValue)((_a = messageContent === null || messageContent === void 0 ? void 0 : messageContent.data) === null || _a === void 0 ? void 0 : _a.file);
|
|
237
|
+
msaLogger.traceError('RPCException error', { traceId: execInterceptor.traceId }, { error: { message: errMsg, stack: err.stack ? err.stack : '', type: 'RpcExceptionsHandler' } });
|
|
244
238
|
// logger.debug(`<= (error:${traceId}): ${JSON.stringify(sendMessage.toString())}`, {
|
|
245
239
|
// ...logParam,
|
|
246
240
|
// duration,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yolo-croket-dev/core",
|
|
3
|
-
"version": "1.7.4-datadog.
|
|
3
|
+
"version": "1.7.4-datadog.10",
|
|
4
4
|
"author": "Yolo Co., Ltd.",
|
|
5
5
|
"description": "Yolo commonization module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@nestjs/common": "^8.2.3",
|
|
18
18
|
"@nestjs/microservices": "9.0.8",
|
|
19
19
|
"@yolo-croket-dev/logger": "^1.0.15",
|
|
20
|
-
"@yolo-croket-dev/msa-logger": "
|
|
20
|
+
"@yolo-croket-dev/msa-logger": "3.0.2-datadog.1",
|
|
21
21
|
"@yolo-croket-dev/redis": "^1.0.23",
|
|
22
22
|
"@yolo-croket-dev/swagger": "^0.0.7",
|
|
23
23
|
"axios": "^1.1.3",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^16.11.9",
|
|
30
30
|
"@types/randomstring": "^1.1.8",
|
|
31
|
-
"@types/uuid": "^8.3.4"
|
|
32
|
-
"dd-trace": "^5.25.0"
|
|
31
|
+
"@types/uuid": "^8.3.4"
|
|
33
32
|
}
|
|
34
33
|
}
|