@yolo-croket-dev/core 1.7.4-datadog.12 → 1.7.4-datadog.13
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.
|
@@ -106,6 +106,11 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
106
106
|
froms: pastFroms,
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
|
+
const loggingSpan = dd_trace_1.default.scope().active();
|
|
110
|
+
if (loggingSpan) {
|
|
111
|
+
loggingSpan.setTag('traceId', traceId);
|
|
112
|
+
loggingSpan.setTag('messagePattern', content.pattern);
|
|
113
|
+
}
|
|
109
114
|
return next.handle()
|
|
110
115
|
.pipe((0, operators_1.tap)(() => {
|
|
111
116
|
const elapsed = Date.now() - now;
|
|
@@ -125,9 +130,14 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
125
130
|
},
|
|
126
131
|
});
|
|
127
132
|
})).pipe((0, operators_1.catchError)((error) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
if (loggingSpan) {
|
|
134
|
+
loggingSpan.setTag('error', true);
|
|
135
|
+
loggingSpan.setTag('error.message', error.message);
|
|
136
|
+
loggingSpan.setTag('error.status', error.status);
|
|
137
|
+
loggingSpan.setTag('error.subMessage', error.subMessage);
|
|
138
|
+
loggingSpan.setTag('error.stack', error.stack);
|
|
139
|
+
loggingSpan.setTag('error.type', error.constructor.name);
|
|
140
|
+
}
|
|
131
141
|
msaLogger.printExceptionFliterService({
|
|
132
142
|
traceId,
|
|
133
143
|
errInfo: {
|