@mondaydotcomorg/z2h-cli 0.25.8 → 0.25.9
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
|
|
3
|
-
import { context, logger } from '@mondaydotcomorg/trident-backend-runtime';
|
|
3
|
+
import { context, logger, metric } from '@mondaydotcomorg/trident-backend-runtime';
|
|
4
4
|
import { BackendRunnerEvents } from '@mondaydotcomorg/z2h-shared-utils/observability';
|
|
5
5
|
import { trackEvent } from '@mondaydotcomorg/z2h-shared-utils/observability/trident';
|
|
6
6
|
import { getDefaultClient } from 'src/utils/elasticache';
|
|
@@ -152,6 +152,7 @@ export async function runSnowflakeQuery(
|
|
|
152
152
|
const cached = scope ? await readCache(queryCacheKey, scope) : null;
|
|
153
153
|
if (cached) {
|
|
154
154
|
const duration_ms = Date.now() - startMs;
|
|
155
|
+
metric.increment(BackendRunnerEvents.snowflake.cacheMetric, { appName, result: 'hit' });
|
|
155
156
|
void trackEvent(BackendRunnerEvents.snowflake.queryExecuted, { appName, duration_ms, cache_hit: true }, BI_SOURCE);
|
|
156
157
|
logger.info(
|
|
157
158
|
{
|
|
@@ -207,6 +208,7 @@ export async function runSnowflakeQuery(
|
|
|
207
208
|
const rows = Array.isArray(data) ? data : [];
|
|
208
209
|
if (scope) {
|
|
209
210
|
await writeCache(queryCacheKey, scope, rows);
|
|
211
|
+
metric.increment(BackendRunnerEvents.snowflake.cacheMetric, { appName, result: 'miss' });
|
|
210
212
|
}
|
|
211
213
|
const duration_ms = Date.now() - startMs;
|
|
212
214
|
void trackEvent(BackendRunnerEvents.snowflake.queryExecuted, { appName, duration_ms, cache_hit: false }, BI_SOURCE);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/z2h-cli",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.9",
|
|
4
4
|
"bin": "./bin/z2h-cli.js",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aws-sdk/client-s3": "^3.706.0",
|
|
54
|
-
"@mondaydotcomorg/z2h-shared-utils": "^0.4.
|
|
54
|
+
"@mondaydotcomorg/z2h-shared-utils": "^0.4.3",
|
|
55
55
|
"chokidar": "^3.6.0",
|
|
56
56
|
"commander": "^12.1.0",
|
|
57
57
|
"cors": "^2.8.6",
|