@mhubcloud/tms_core 3.8.0-beta.0 → 3.8.0-beta.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.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -139,7 +139,7 @@ function logEvent(publisher2, event, region, status, payload, id) {
|
|
|
139
139
|
if (!process.env["DisableMetrics"]) {
|
|
140
140
|
const metricRegion = process.env["DisableMetricRegionLogging"] ? "default" : region;
|
|
141
141
|
const name = status >= 200 && status < 400 ? "DispatchSuccess" : "DispatchFailure";
|
|
142
|
-
logAggregatedMetric("
|
|
142
|
+
logAggregatedMetric("events", name, `${metricRegion}:${publisher2}:${event}`);
|
|
143
143
|
}
|
|
144
144
|
;
|
|
145
145
|
if (!process.env["DisableTraces"]) {
|
|
@@ -160,7 +160,7 @@ function logEvent(publisher2, event, region, status, payload, id) {
|
|
|
160
160
|
function logException(exception, publisher2) {
|
|
161
161
|
if (!process.env["DisableMetrics"]) {
|
|
162
162
|
const message = exception.message.split(".")[0]?.substring(0, 100).replace(/:/g, "");
|
|
163
|
-
logAggregatedMetric("
|
|
163
|
+
logAggregatedMetric("errors", exception.name, `${publisher2 ?? "Other"}:${message}`);
|
|
164
164
|
}
|
|
165
165
|
;
|
|
166
166
|
if (!process.env["DisableTraces"]) {
|