@mhubcloud/tms_core 3.7.1-beta.1 → 3.7.2-beta.0
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 +22 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -107,26 +107,30 @@ function logEvent(publisher2, event, region, status, payload, id) {
|
|
|
107
107
|
let message = "";
|
|
108
108
|
if (status || status === 0) {
|
|
109
109
|
if (status >= 200 && status < 300) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
if (!process.env["DisableMetrics"]) {
|
|
111
|
+
aiClient?.trackMetric({
|
|
112
|
+
name: `DispatchSuccess`,
|
|
113
|
+
value: 1,
|
|
114
|
+
properties: {
|
|
115
|
+
publisher: publisher2,
|
|
116
|
+
event,
|
|
117
|
+
region
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
119
121
|
message = "Event dispatched to platform";
|
|
120
122
|
} else {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
if (!process.env["DisableMetrics"]) {
|
|
124
|
+
aiClient?.trackMetric({
|
|
125
|
+
name: `DispatchFail`,
|
|
126
|
+
value: 1,
|
|
127
|
+
properties: {
|
|
128
|
+
publisher: publisher2,
|
|
129
|
+
event,
|
|
130
|
+
region
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
130
134
|
message = "Event dispatch failed";
|
|
131
135
|
}
|
|
132
136
|
} else {
|