@yolo-croket-dev/core 1.7.4-datadog.0 → 1.7.4-datadog.1

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.
@@ -185,7 +185,7 @@ let RPCInterceptor = class RPCInterceptor {
185
185
  }
186
186
  const noAck = message.fields.routingKey.includes('ASYNC');
187
187
  let localErrorProcessor = async (err) => {
188
- var _a, _b;
188
+ var _a;
189
189
  const errMsg = err.response ? err.response : err.message;
190
190
  const status = err.status ? err.status : 500;
191
191
  const errType = err.errType;
@@ -195,7 +195,13 @@ let RPCInterceptor = class RPCInterceptor {
195
195
  const duration = Date.now() - now;
196
196
  let isAck = false;
197
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);
198
+ const span = dd_trace_1.default.scope().active();
199
+ if (span) {
200
+ span.setTag('error', err);
201
+ }
202
+ else {
203
+ msaLogger.error('No active span found', { traceId: 'NO_ACTIVE_SPAN' }, { span });
204
+ }
199
205
  }
200
206
  /** 파일 객체 처리 */
201
207
  (0, functions_1.reWriteFileValue)(arg === null || arg === void 0 ? void 0 : arg.file);
@@ -240,7 +246,7 @@ let RPCInterceptor = class RPCInterceptor {
240
246
  }
241
247
  const messageContent = message.content.toString();
242
248
  /** 파일 객체 처리 */
243
- (0, functions_1.reWriteFileValue)((_b = messageContent === null || messageContent === void 0 ? void 0 : messageContent.data) === null || _b === void 0 ? void 0 : _b.file);
249
+ (0, functions_1.reWriteFileValue)((_a = messageContent === null || messageContent === void 0 ? void 0 : messageContent.data) === null || _a === void 0 ? void 0 : _a.file);
244
250
  // logger.debug(`<= (error:${traceId}): ${JSON.stringify(sendMessage.toString())}`, {
245
251
  // ...logParam,
246
252
  // duration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yolo-croket-dev/core",
3
- "version": "1.7.4-datadog.0",
3
+ "version": "1.7.4-datadog.1",
4
4
  "author": "Yolo Co., Ltd.",
5
5
  "description": "Yolo commonization module",
6
6
  "main": "index.js",