@openclaw/diagnostics-prometheus 2026.5.7 → 2026.5.10-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 +34 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -219,6 +219,7 @@ function renderPrometheusMetrics(store) {
|
|
|
219
219
|
}
|
|
220
220
|
function runLabels(evt) {
|
|
221
221
|
return {
|
|
222
|
+
...evt.blockedBy ? { blocked_by: lowCardinalityLabel(evt.blockedBy) } : {},
|
|
222
223
|
channel: lowCardinalityLabel(evt.channel),
|
|
223
224
|
model: lowCardinalityLabel(evt.model),
|
|
224
225
|
outcome: lowCardinalityLabel(evt.outcome, "unknown"),
|
|
@@ -256,6 +257,23 @@ function harnessLabels(evt) {
|
|
|
256
257
|
provider: lowCardinalityLabel(evt.provider)
|
|
257
258
|
};
|
|
258
259
|
}
|
|
260
|
+
function sessionRecoveryLabels(evt) {
|
|
261
|
+
return {
|
|
262
|
+
action: evt.type === "session.recovery.completed" ? lowCardinalityLabel(evt.action, "unknown") : evt.allowActiveAbort ? "abort" : "recover",
|
|
263
|
+
active_work_kind: lowCardinalityLabel(evt.activeWorkKind, "none"),
|
|
264
|
+
state: evt.state,
|
|
265
|
+
status: evt.type === "session.recovery.completed" ? evt.status : "requested"
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function talkLabels(evt) {
|
|
269
|
+
return {
|
|
270
|
+
brain: lowCardinalityLabel(evt.brain),
|
|
271
|
+
event_type: lowCardinalityLabel(evt.talkEventType),
|
|
272
|
+
mode: lowCardinalityLabel(evt.mode),
|
|
273
|
+
provider: lowCardinalityLabel(evt.provider),
|
|
274
|
+
transport: lowCardinalityLabel(evt.transport)
|
|
275
|
+
};
|
|
276
|
+
}
|
|
259
277
|
function recordModelUsage(store, evt) {
|
|
260
278
|
const labels = {
|
|
261
279
|
agent: lowCardinalityLabel(evt.agentId),
|
|
@@ -323,6 +341,12 @@ function recordDiagnosticEvent(store, evt, metadata) {
|
|
|
323
341
|
reason: lowCardinalityLabel(evt.reason, "none")
|
|
324
342
|
}, seconds(evt.durationMs));
|
|
325
343
|
return;
|
|
344
|
+
case "message.delivery.started":
|
|
345
|
+
store.counter("openclaw_message_delivery_started_total", "Outbound message delivery attempts started.", {
|
|
346
|
+
channel: lowCardinalityLabel(evt.channel),
|
|
347
|
+
delivery_kind: lowCardinalityLabel(evt.deliveryKind, "other")
|
|
348
|
+
});
|
|
349
|
+
return;
|
|
326
350
|
case "message.delivery.completed":
|
|
327
351
|
case "message.delivery.error":
|
|
328
352
|
store.counter("openclaw_message_delivery_total", "Outbound message delivery attempts by outcome.", {
|
|
@@ -338,6 +362,16 @@ function recordDiagnosticEvent(store, evt, metadata) {
|
|
|
338
362
|
outcome: evt.type === "message.delivery.error" ? "error" : "completed"
|
|
339
363
|
}, seconds(evt.durationMs));
|
|
340
364
|
return;
|
|
365
|
+
case "talk.event":
|
|
366
|
+
store.counter("openclaw_talk_event_total", "Talk events emitted by type.", talkLabels(evt));
|
|
367
|
+
store.histogram("openclaw_talk_event_duration_seconds", "Talk event duration in seconds when reported.", talkLabels(evt), seconds(evt.durationMs));
|
|
368
|
+
store.histogram("openclaw_talk_audio_bytes", "Talk audio frame byte lengths.", talkLabels(evt), numericValue(evt.byteLength), BYTE_BUCKETS);
|
|
369
|
+
return;
|
|
370
|
+
case "session.recovery.requested":
|
|
371
|
+
case "session.recovery.completed":
|
|
372
|
+
store.counter("openclaw_session_recovery_total", "Session recovery observations by status and action.", sessionRecoveryLabels(evt));
|
|
373
|
+
store.histogram("openclaw_session_recovery_age_seconds", "Age of sessions selected for recovery in seconds.", sessionRecoveryLabels(evt), seconds(evt.ageMs));
|
|
374
|
+
return;
|
|
341
375
|
case "queue.lane.enqueue":
|
|
342
376
|
case "queue.lane.dequeue":
|
|
343
377
|
store.gauge("openclaw_queue_lane_size", "Current diagnostic queue lane size.", { lane: lowCardinalityLabel(evt.lane) }, numericValue(evt.queueSize));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/diagnostics-prometheus",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.10-beta.1",
|
|
4
4
|
"description": "OpenClaw diagnostics Prometheus exporter",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"minHostVersion": ">=2026.4.25"
|
|
22
22
|
},
|
|
23
23
|
"compat": {
|
|
24
|
-
"pluginApi": ">=2026.5.
|
|
24
|
+
"pluginApi": ">=2026.5.10-beta.1"
|
|
25
25
|
},
|
|
26
26
|
"build": {
|
|
27
|
-
"openclawVersion": "2026.5.
|
|
27
|
+
"openclawVersion": "2026.5.10-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"release": {
|
|
30
30
|
"publishToClawHub": true,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"openclaw.plugin.json"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"openclaw": ">=2026.5.
|
|
42
|
+
"openclaw": ">=2026.5.10-beta.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"openclaw": {
|