@mhubcloud/tms_core 3.8.0-beta.1 → 3.8.0-beta.2
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 +3 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76,11 +76,10 @@ var appInsights = __toESM(require("applicationinsights"));
|
|
|
76
76
|
// src/utils/redisClient.ts
|
|
77
77
|
var import_redis = require("redis");
|
|
78
78
|
var client;
|
|
79
|
-
var port = process.env["RedisPort"] ?? "6380";
|
|
80
79
|
async function getRedisClient() {
|
|
81
80
|
if (!client) {
|
|
82
81
|
client = (0, import_redis.createClient)({
|
|
83
|
-
url: `rediss://${process.env["RedisUrl"]}
|
|
82
|
+
url: `rediss://${process.env["RedisUrl"]}`,
|
|
84
83
|
password: process.env["RedisPassword"],
|
|
85
84
|
socket: { tls: true }
|
|
86
85
|
});
|
|
@@ -159,8 +158,8 @@ function logEvent(publisher2, event, region, status, payload, id) {
|
|
|
159
158
|
}
|
|
160
159
|
function logException(exception, publisher2) {
|
|
161
160
|
if (!process.env["DisableMetrics"]) {
|
|
162
|
-
const message = exception.message.split(".")[0]?.substring(0, 100)
|
|
163
|
-
logAggregatedMetric("errors",
|
|
161
|
+
const message = exception.message.split(".")[0]?.substring(0, 100)?.replace(/:/g, "") ?? "Error";
|
|
162
|
+
logAggregatedMetric("errors", message, `${publisher2 ?? "Other"}:${exception.name}`);
|
|
164
163
|
}
|
|
165
164
|
;
|
|
166
165
|
if (!process.env["DisableTraces"]) {
|