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