@junando/core 0.12.3 → 0.14.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.d.ts +38 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +204 -90
- package/dist/index.js.map +1 -1
- package/dist/shared/metrics/index.d.ts +3 -3
- package/dist/shared/metrics/index.d.ts.map +1 -1
- package/dist/shared/metrics/index.js +6 -6
- package/dist/shared/metrics/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Counter, Gauge, Histogram, Registry } from "prom-client";
|
|
2
2
|
declare namespace index_d_exports {
|
|
3
|
-
export { alertClusters, alertsProcessed, alertsReceived, dedupDuplicate,
|
|
3
|
+
export { alertClusters, alertsProcessed, alertsReceived, dedupDuplicate, dedupFailoverTotal, dedupNew, latency, llmInferenceDuration, llmInferenceTotal, notificationsTotal, pipelineInlineFailuresTotal, registry, sqsQueueLag, suppressedClusters, webhookRequestsTotal };
|
|
4
4
|
}
|
|
5
5
|
export declare const registry: Registry<"text/plain; version=0.0.4; charset=utf-8">;
|
|
6
6
|
export declare const alertsReceived: Counter<"status">;
|
|
@@ -12,8 +12,8 @@ export declare const llmInferenceDuration: Histogram<"model">;
|
|
|
12
12
|
export declare const llmInferenceTotal: Counter<"status">;
|
|
13
13
|
/** Tracks inline pipeline failures in local dev mode. */
|
|
14
14
|
export declare const pipelineInlineFailuresTotal: Counter<"reason">;
|
|
15
|
-
/** Tracks
|
|
16
|
-
export declare const
|
|
15
|
+
/** Tracks dedup store fail-open activations (any store). */
|
|
16
|
+
export declare const dedupFailoverTotal: Counter<string>;
|
|
17
17
|
/** Tracks new alert clusters (dedup: first-time fingerprint). */
|
|
18
18
|
export declare const dedupNew: Counter<"source">;
|
|
19
19
|
/** Tracks duplicate alert clusters (dedup: fingerprint already seen). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/shared/metrics/index.ts"],"mappings":";;;;qBAEa,UAAQ;qBAER,gBAAc;qBAOd,sBAAoB;qBAOpB,iBAAe;qBAOf,eAAa;qBAMb,SAAO;qBAQP,sBAAoB;qBAQpB,mBAAiB;;qBAQjB,6BAA2B;;qBAQ3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/shared/metrics/index.ts"],"mappings":";;;;qBAEa,UAAQ;qBAER,gBAAc;qBAOd,sBAAoB;qBAOpB,iBAAe;qBAOf,eAAa;qBAMb,SAAO;qBAQP,sBAAoB;qBAQpB,mBAAiB;;qBAQjB,6BAA2B;;qBAQ3B,oBAAkB;;qBAOlB,UAAQ;;qBAQR,gBAAc;;qBAQd,oBAAkB;;qBAQlB,aAAW;;qBAQX,oBAAkB"}
|
|
@@ -6,8 +6,8 @@ var metrics_exports = /* @__PURE__ */ __exportAll({
|
|
|
6
6
|
alertsProcessed: () => alertsProcessed,
|
|
7
7
|
alertsReceived: () => alertsReceived,
|
|
8
8
|
dedupDuplicate: () => dedupDuplicate,
|
|
9
|
+
dedupFailoverTotal: () => dedupFailoverTotal,
|
|
9
10
|
dedupNew: () => dedupNew,
|
|
10
|
-
dedupRedisFailoverTotal: () => dedupRedisFailoverTotal,
|
|
11
11
|
latency: () => latency,
|
|
12
12
|
llmInferenceDuration: () => llmInferenceDuration,
|
|
13
13
|
llmInferenceTotal: () => llmInferenceTotal,
|
|
@@ -84,10 +84,10 @@ const pipelineInlineFailuresTotal = new Counter({
|
|
|
84
84
|
labelNames: ["reason"],
|
|
85
85
|
registers: [registry]
|
|
86
86
|
});
|
|
87
|
-
/** Tracks
|
|
88
|
-
const
|
|
89
|
-
name: "
|
|
90
|
-
help: "Total number of
|
|
87
|
+
/** Tracks dedup store fail-open activations (any store). */
|
|
88
|
+
const dedupFailoverTotal = new Counter({
|
|
89
|
+
name: "junando_dedup_failover_total",
|
|
90
|
+
help: "Total number of dedup store fail-open activations",
|
|
91
91
|
registers: [registry]
|
|
92
92
|
});
|
|
93
93
|
/** Tracks new alert clusters (dedup: first-time fingerprint). */
|
|
@@ -126,6 +126,6 @@ const suppressedClusters = new Gauge({
|
|
|
126
126
|
registers: [registry]
|
|
127
127
|
});
|
|
128
128
|
//#endregion
|
|
129
|
-
export { alertClusters, alertsProcessed, alertsReceived, dedupDuplicate,
|
|
129
|
+
export { alertClusters, alertsProcessed, alertsReceived, dedupDuplicate, dedupFailoverTotal, dedupNew, latency, llmInferenceDuration, llmInferenceTotal, notificationsTotal, pipelineInlineFailuresTotal, registry, sqsQueueLag, suppressedClusters, metrics_exports as t, webhookRequestsTotal };
|
|
130
130
|
|
|
131
131
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/shared/metrics/index.ts"],"sourcesContent":["import { Registry, Counter, Gauge, Histogram } from 'prom-client';\n\nexport const registry = new Registry();\n\nexport const alertsReceived = new Counter({\n name: 'junando_alerts_received_total',\n help: 'Total number of alerts received via webhook',\n labelNames: ['status'],\n registers: [registry],\n});\n\nexport const webhookRequestsTotal = new Counter({\n name: 'junando_webhooks_total',\n help: 'Total number of webhook HTTP requests',\n labelNames: ['endpoint', 'status'],\n registers: [registry],\n});\n\nexport const alertsProcessed = new Counter({\n name: 'junando_alerts_processed_total',\n help: 'Total number of alerts processed successfully',\n labelNames: ['result'],\n registers: [registry],\n});\n\nexport const alertClusters = new Gauge({\n name: 'junando_alert_clusters',\n help: 'Current number of alert clusters',\n registers: [registry],\n});\n\nexport const latency = new Histogram({\n name: 'junando_webhook_duration_seconds',\n help: 'Webhook request duration in seconds',\n labelNames: ['status'],\n buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5],\n registers: [registry],\n});\n\nexport const llmInferenceDuration = new Histogram({\n name: 'junando_llm_inference_duration_seconds',\n help: 'LLM inference duration in seconds',\n labelNames: ['model'],\n buckets: [0.5, 1, 2, 5, 10, 30],\n registers: [registry],\n});\n\nexport const llmInferenceTotal = new Counter({\n name: 'junando_llm_inference_total',\n help: 'Total number of LLM inference calls',\n labelNames: ['status'],\n registers: [registry],\n});\n\n/** Tracks inline pipeline failures in local dev mode. */\nexport const pipelineInlineFailuresTotal = new Counter({\n name: 'junando_pipeline_inline_failures_total',\n help: 'Total number of inline pipeline failures in dev mode',\n labelNames: ['reason'],\n registers: [registry],\n});\n\n/** Tracks
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/shared/metrics/index.ts"],"sourcesContent":["import { Registry, Counter, Gauge, Histogram } from 'prom-client';\n\nexport const registry = new Registry();\n\nexport const alertsReceived = new Counter({\n name: 'junando_alerts_received_total',\n help: 'Total number of alerts received via webhook',\n labelNames: ['status'],\n registers: [registry],\n});\n\nexport const webhookRequestsTotal = new Counter({\n name: 'junando_webhooks_total',\n help: 'Total number of webhook HTTP requests',\n labelNames: ['endpoint', 'status'],\n registers: [registry],\n});\n\nexport const alertsProcessed = new Counter({\n name: 'junando_alerts_processed_total',\n help: 'Total number of alerts processed successfully',\n labelNames: ['result'],\n registers: [registry],\n});\n\nexport const alertClusters = new Gauge({\n name: 'junando_alert_clusters',\n help: 'Current number of alert clusters',\n registers: [registry],\n});\n\nexport const latency = new Histogram({\n name: 'junando_webhook_duration_seconds',\n help: 'Webhook request duration in seconds',\n labelNames: ['status'],\n buckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5],\n registers: [registry],\n});\n\nexport const llmInferenceDuration = new Histogram({\n name: 'junando_llm_inference_duration_seconds',\n help: 'LLM inference duration in seconds',\n labelNames: ['model'],\n buckets: [0.5, 1, 2, 5, 10, 30],\n registers: [registry],\n});\n\nexport const llmInferenceTotal = new Counter({\n name: 'junando_llm_inference_total',\n help: 'Total number of LLM inference calls',\n labelNames: ['status'],\n registers: [registry],\n});\n\n/** Tracks inline pipeline failures in local dev mode. */\nexport const pipelineInlineFailuresTotal = new Counter({\n name: 'junando_pipeline_inline_failures_total',\n help: 'Total number of inline pipeline failures in dev mode',\n labelNames: ['reason'],\n registers: [registry],\n});\n\n/** Tracks dedup store fail-open activations (any store). */\nexport const dedupFailoverTotal = new Counter({\n name: 'junando_dedup_failover_total',\n help: 'Total number of dedup store fail-open activations',\n registers: [registry],\n});\n\n/** Tracks new alert clusters (dedup: first-time fingerprint). */\nexport const dedupNew = new Counter({\n name: 'junando_dedup_new_total',\n help: 'Total number of new alert clusters (not yet seen)',\n labelNames: ['source'],\n registers: [registry],\n});\n\n/** Tracks duplicate alert clusters (dedup: fingerprint already seen). */\nexport const dedupDuplicate = new Counter({\n name: 'junando_dedup_duplicate_total',\n help: 'Total number of duplicate alert clusters skipped by dedup',\n labelNames: ['source'],\n registers: [registry],\n});\n\n/** Tracks outbound notification attempts by channel and outcome. */\nexport const notificationsTotal = new Counter({\n name: 'junando_notifications_total',\n help: 'Total number of notification attempts',\n labelNames: ['channel', 'outcome'],\n registers: [registry],\n});\n\n/** Tracks approximate number of unprocessed SQS messages (queue lag). */\nexport const sqsQueueLag = new Gauge({\n name: 'junando_sqs_queue_lag',\n help: 'Approximate number of unprocessed messages in the SQS queue',\n labelNames: ['queue_name'],\n registers: [registry],\n});\n\n/** Tracks clusters suppressed by the rule engine, segmented by rule ID. */\nexport const suppressedClusters = new Gauge({\n name: 'junando_suppressed_clusters',\n help: 'Current number of clusters suppressed by the rule engine',\n labelNames: ['rule_id'],\n registers: [registry],\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA,MAAa,WAAW,IAAI,SAAS;AAErC,MAAa,iBAAiB,IAAI,QAAQ;CACxC,MAAM;CACN,MAAM;CACN,YAAY,CAAC,QAAQ;CACrB,WAAW,CAAC,QAAQ;AACtB,CAAC;AAED,MAAa,uBAAuB,IAAI,QAAQ;CAC9C,MAAM;CACN,MAAM;CACN,YAAY,CAAC,YAAY,QAAQ;CACjC,WAAW,CAAC,QAAQ;AACtB,CAAC;AAED,MAAa,kBAAkB,IAAI,QAAQ;CACzC,MAAM;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nC,MAAM;CACN,MAAM;CACN,YAAY,CAAC,YAAY;CACzB,WAAW,CAAC,QAAQ;AACtB,CAAC;;AAGD,MAAa,qBAAqB,IAAI,MAAM;CAC1C,MAAM;CACN,MAAM;CACN,YAAY,CAAC,SAAS;CACtB,WAAW,CAAC,QAAQ;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junando/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Core domain types, interfaces, and shared utilities for the Junando alerting platform",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@anthropic-ai/sdk": "^0.124.0",
|
|
23
|
+
"@aws-sdk/client-dynamodb": "^3.1127.0",
|
|
23
24
|
"@google/generative-ai": "^0.24.1",
|
|
24
25
|
"@types/opossum": "^8.1.9",
|
|
25
26
|
"ioredis": "^6.0.0",
|