@senad-d/observme 0.1.3 → 0.1.4
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/.env.example +4 -0
- package/CHANGELOG.md +13 -0
- package/README.md +12 -3
- package/dashboards/observme-agent-node-graphs.json +5 -5
- package/dashboards/observme-agents.json +169 -4
- package/dashboards/observme-alerts.yaml +16 -3
- package/dashboards/observme-overview.json +6 -6
- package/dashboards/observme-trace-journey.json +4 -4
- package/docs/agent-subagent-observability-requirements.md +15 -7
- package/docs/compatibility-matrix.md +10 -2
- package/docs/configuration.md +5 -0
- package/docs/reference/04-telemetry-semantic-conventions.md +38 -1
- package/docs/reference/05-otel-pipeline-and-collector.md +23 -10
- package/docs/reference/09-dashboards-alerts-slos.md +132 -3
- package/docs/reference/10-testing-release-operations.md +44 -14
- package/docs/reference/11-deployment-runbooks.md +61 -5
- package/docs/reference/12-configuration-reference.md +18 -1
- package/docs/review-validation.md +17 -0
- package/examples/README.md +7 -2
- package/examples/collector.yaml +8 -8
- package/examples/observme.yaml +1 -0
- package/package.json +3 -1
- package/src/config/bootstrap-project-config.ts +1 -0
- package/src/config/defaults.ts +1 -0
- package/src/config/load-config.ts +11 -0
- package/src/config/schema.ts +9 -0
- package/src/config/validate.ts +20 -1
- package/src/pi/active-agent-lease.ts +101 -0
- package/src/pi/event-handlers/lifecycle.ts +120 -46
- package/src/pi/handler-runtime.ts +21 -3
- package/src/pi/handler-types.ts +10 -2
- package/src/semconv/metrics.ts +6 -0
package/.env.example
CHANGED
|
@@ -13,6 +13,10 @@ OBSERVME_TENANT=local-dev
|
|
|
13
13
|
OBSERVME_OTLP_ENDPOINT=http://localhost:4318
|
|
14
14
|
OBSERVME_OTLP_PROTOCOL=http/protobuf
|
|
15
15
|
|
|
16
|
+
# Active-agent lease duration. Must be 10000-300000 ms and at least
|
|
17
|
+
# twice the metric export interval plus 5000 ms of clock-skew margin.
|
|
18
|
+
OBSERVME_ACTIVE_AGENT_LEASE_DURATION_MS=60000
|
|
19
|
+
|
|
16
20
|
# Optional OTLP bearer token for remote/secured collectors. Leave blank for local dev.
|
|
17
21
|
OBSERVME_OTLP_TOKEN=
|
|
18
22
|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
+
- Added a bounded GitHub-hosted Linux CI job for active-agent lease contracts and cancellation-oriented Docker integration coverage, with resource-labeled unconditional cleanup.
|
|
8
|
+
- Added Docker-backed active-agent lease integration coverage for clean shutdown, `SIGTERM`, and `SIGKILL`, proving cached raw claims outlive lease-aware activity without a Collector restart.
|
|
9
|
+
- Added a session-scoped active-agent lease controller that renews from the SDK metric collection cycle with an injectable wall clock and deterministic disposal.
|
|
10
|
+
- Added the `observme_agent_lease_expires_unixtime_seconds` asynchronous gauge contract with unit metadata and deterministic observable callback test support.
|
|
11
|
+
- Added bounded `metrics.activeAgentLeaseDurationMillis` configuration with layered `OBSERVME_ACTIVE_AGENT_LEASE_DURATION_MS` loading, fail-safe validation, and generated/example configuration coverage.
|
|
12
|
+
- Added a production-readiness task plan for lease-based active-agent accounting that remains accurate after crashes, forced termination, and cancelled GitHub Actions jobs.
|
|
7
13
|
- Added a packaged `observme-docs` Pi skill that routes natural-language ObservMe questions to focused user, operator, reference, example, and contributor documentation through Pi's normal skill discovery, without an ObservMe system-prompt hook.
|
|
8
14
|
- Added a versioned `@senad-d/observme/integration` event-bus API and transport-agnostic child-runner example for parent-side spawn/wait/join telemetry and child process lineage propagation.
|
|
9
15
|
- Added README tables cataloging available metrics, trace spans, and structured log events, including opt-in and reserved signals.
|
|
@@ -15,6 +21,11 @@
|
|
|
15
21
|
|
|
16
22
|
### Changed
|
|
17
23
|
|
|
24
|
+
- Completed production active-agent lease documentation, raw-query migration guidance, GitHub Actions/self-hosted clock and cleanup runbooks, missing/expired-lease troubleshooting, Collector restart semantics, and sanitized release-validation evidence.
|
|
25
|
+
- Reframed the Collector's five-minute Prometheus `metric_expiration` as exporter-wide stale-series/cardinality cleanup, longer than the default active-agent lease and independent of leased liveness.
|
|
26
|
+
- Migrated active-agent dashboard totals, bounded breakdowns, aggregate topology inputs, and stuck-high alerts to leased activity, with raw/expired-claim diagnostics and a deployment-tunable stale-claim alert.
|
|
27
|
+
- Defined and enforced canonical lease-aware active-agent PromQL for totals, bounded breakdowns, topology inputs, and alerts, including replica deduplication, future-lease rejection, and zero-safe idle states.
|
|
28
|
+
- Documented the production active-agent lease, clock, convergence, instance-join, failure-mode, and backward-compatibility contract used by upcoming runtime and dashboard integration.
|
|
18
29
|
- Moved the detailed technical reference into `docs/reference/` and updated package, documentation, examples, dashboards, tests, and skill routes to use the new location.
|
|
19
30
|
- Made the packaged `observme-docs` skill resolve routed references from its installed package root instead of the caller's working directory or a repository checkout.
|
|
20
31
|
- Reorganized documentation around `docs/README.md`, a categorized technical-reference index, and an example guide with explicit usage and safety notes.
|
|
@@ -27,6 +38,8 @@
|
|
|
27
38
|
|
|
28
39
|
### Fixed
|
|
29
40
|
|
|
41
|
+
- Restored clean npm dependency resolution by pinning TypeScript to the latest release supported by `typescript-eslint`.
|
|
42
|
+
- Integrated active-agent lease activation and deactivation with clean shutdown, duplicate/reload replacement, resume, and failed-start cleanup so final flushes cannot renew stale activity.
|
|
30
43
|
- Fixed session, workflow, agent, turn, LLM, tool, Bash, histogram, active-span, failure/recovery, and session-count telemetry accuracy.
|
|
31
44
|
- Fixed lifecycle serialization, duplicate session replacement, bounded shutdown/flush behavior, backfill cancellation, parallel tool correlation, and bounded agent-tree state cleanup.
|
|
32
45
|
- Hardened configuration validation, project-root path confinement, endpoint security, custom redaction patterns, tenant-salted hashing, and environment propagation.
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ This checkout implements the ObservMe MVP scope described by the packaged [`docs
|
|
|
62
62
|
|
|
63
63
|
- Extension load checks and `/obs health` backend checks.
|
|
64
64
|
- Session, workflow, agent-run, turn, LLM, tool, bash, subagent-spawn, wait/join, compaction, branch, model-change, and thinking-level telemetry.
|
|
65
|
-
-
|
|
65
|
+
- Lease-qualified multi-agent activity plus tree metrics for depth, fan-out, orphan agents, trace-context propagation failures, child failures, and workflow duration; abrupt exits converge without a Collector restart.
|
|
66
66
|
- Session-scoped OTLP trace, metric, and log exporters with bounded queues, timeouts, and shutdown flushing.
|
|
67
67
|
- Configurable capture controls, redaction, path scrubbing, hashing, truncation, and high-cardinality metric-label guards.
|
|
68
68
|
- Grafana dashboard JSON, alert rules, SLO definitions, Collector examples, and compatibility matrix artifacts.
|
|
@@ -230,10 +230,17 @@ Metric labels are intentionally low-cardinality. Session, workflow, agent, trace
|
|
|
230
230
|
| Histogram | Workflow and agent tree | `observme_workflow_duration_ms`<br>`observme_agent_run_duration_ms`<br>`observme_subagent_spawn_duration_ms`<br>`observme_agent_wait_duration_ms`<br>`observme_agent_join_duration_ms`<br>`observme_agent_tree_depth`<br>`observme_agent_tree_width`<br>`observme_agent_fanout_count` | Workflow/agent latency and multi-agent tree shape. |
|
|
231
231
|
| Histogram | Operation latency | `observme_turn_duration_ms`<br>`observme_llm_request_duration_ms`<br>`observme_tool_duration_ms`<br>`observme_bash_duration_ms`<br>`observme_handler_duration_ms` | End-to-end operation and extension-handler duration in milliseconds. |
|
|
232
232
|
| Histogram | Context and payload size | `observme_compaction_tokens_before`<br>`observme_prompt_size_chars`<br>`observme_response_size_chars`<br>`observme_tool_result_size_chars` | Context size before compaction and payload sizes in characters. Size metrics do not contain payload content. |
|
|
233
|
-
| Up-down counter | Current activity | `observme_active_spans`<br>`observme_active_agents` | Active operations and
|
|
233
|
+
| Up-down counter | Current activity | `observme_active_spans`<br>`observme_active_agents` | Active operations and the compatibility lifecycle claim for agents in the current exported stream. |
|
|
234
|
+
| Asynchronous gauge | Agent liveness lease | `observme_agent_lease_expires_unixtime_seconds` | Absolute Unix expiry renewed on each metric collection while the session is active; operational active-agent queries join it to the positive lifecycle claim. |
|
|
234
235
|
| Registered, not yet recorded | Agent lifetime | `observme_agent_lifetime_duration_ms` | Reserved instrument; the current live handlers do not record measurements yet. |
|
|
235
236
|
| Registered, not yet recorded | Official GenAI compatibility | `gen_ai.client.token.usage`<br>`gen_ai.client.operation.duration` | Reserved OpenTelemetry GenAI instruments; use the `observme_llm_*` metrics above for current data. |
|
|
236
237
|
|
|
238
|
+
### Active-agent liveness
|
|
239
|
+
|
|
240
|
+
`observme_active_agents` remains a clean-start/clean-shutdown lifecycle claim, but raw sums are not authoritative after a crash, `SIGKILL`, cancelled GitHub Actions job, or lost runner. The shipped dashboards and alerts count an instance only when that claim is positive and its `observme_agent_lease_expires_unixtime_seconds` value is current and within the supported future horizon. Clean shutdown reaches zero after export/scrape propagation; an ungraceful exit converges within the configured lease plus up to 5 seconds of supported clock skew and one Prometheus scrape/evaluation interval (80 seconds with the default 60-second lease and a 15-second scrape).
|
|
241
|
+
|
|
242
|
+
Missing, expired, malformed, or pathologically future leases fail closed. GitHub-hosted runners satisfy the clock requirement; self-hosted runners must keep the producer and Prometheus clocks synchronized within 5 seconds. Collector restart is not required for convergence, even when its Prometheus exporter continues to expose a cached raw claim. Migrate custom panels, alerts, and recording rules from raw `sum(observme_active_agents)` queries to the [canonical lease-aware PromQL](docs/reference/09-dashboards-alerts-slos.md#131-canonical-active-agent-promql), and use raw/expired claims only for diagnostics.
|
|
243
|
+
|
|
237
244
|
### Traces
|
|
238
245
|
|
|
239
246
|
| Span name | Created for | Notes |
|
|
@@ -383,7 +390,7 @@ These assets are included in the npm package:
|
|
|
383
390
|
|
|
384
391
|
Open **ObservMe Overview** first for health/SLO chips, workload, cost, latency, agent-lineage status, and time-preserving links to focused dashboards. Use **Trace Journey** to follow a session/workflow/agent/run across Prometheus aggregates, Loki logs, and Tempo traces. Use **LLM Conversations** only for redacted opt-in content; raw prompt, response, command, path, and error-message values should never be placed in dashboard URLs or Prometheus labels. Empty failure tables normally mean no matching failures in the selected range, while optional content panels can be empty because capture is disabled by default.
|
|
385
392
|
|
|
386
|
-
The full dashboard map, standard variables, drill-down workflow, threshold colors, and zero-state semantics are documented in `docs/reference/09-dashboards-alerts-slos.md`.
|
|
393
|
+
The full dashboard map, canonical lease-aware active-agent queries, raw-query migration, standard variables, drill-down workflow, threshold colors, and zero-state semantics are documented in `docs/reference/09-dashboards-alerts-slos.md`. For an unexpected zero or stale raw claim, follow the active-lease troubleshooting flow in `docs/reference/11-deployment-runbooks.md` and check Export Health before concluding that the producer stopped.
|
|
387
394
|
|
|
388
395
|
## Documentation Set
|
|
389
396
|
|
|
@@ -415,8 +422,10 @@ npm run lint:fix # ESLint auto-fix pass
|
|
|
415
422
|
npm run format:check
|
|
416
423
|
npm run test
|
|
417
424
|
npm run test:integration:collector
|
|
425
|
+
npm run test:integration:active-agent-lease
|
|
418
426
|
npm run test:integration:grafana-stack
|
|
419
427
|
npm run check:pack
|
|
428
|
+
npm run pack:dry-run
|
|
420
429
|
npm run smoke:pi-runtime
|
|
421
430
|
npm run validate:grafana-obs
|
|
422
431
|
pi --no-extensions -e .
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"type": "prometheus",
|
|
46
46
|
"uid": "prometheus"
|
|
47
47
|
},
|
|
48
|
-
"description": "Aggregate
|
|
48
|
+
"description": "Aggregate fleet topology built only from bounded Prometheus labels; it is not per-workflow truth or a single trace tree. Role nodes combine canonical leased-current activity with selected-range run/spawn counts, so node and edge values must not be read as one execution. Clean shutdown removes leased activity after export/scrape propagation; after a crash, SIGKILL, cancelled job, or runner loss, leased activity converges to zero within the default 60-second lease plus one Prometheus scrape while raw claims may stay cached. Red nodes and edges identify spawn, lineage, or propagation failures. /obs agents is current-process child state; use Trace Journey for one execution.",
|
|
49
49
|
"fieldConfig": {
|
|
50
50
|
"defaults": {
|
|
51
51
|
"mappings": [],
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uid": "prometheus"
|
|
89
89
|
},
|
|
90
90
|
"editorMode": "code",
|
|
91
|
-
"expr": "label_replace(label_replace(label_replace(label_replace(label_replace(label_replace(vector(1), \"id\", \"pi-root\", \"__name__\", \".*\"), \"title\", \"Pi root\", \"id\", \".*\"), \"subTitle\", \"workflow entry\", \"id\", \".*\"), \"mainStat\", \"entry\", \"id\", \".*\"), \"secondaryStat\", \"aggregate\", \"id\", \".*\"), \"color\", \"blue\", \"id\", \".*\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(
|
|
91
|
+
"expr": "label_replace(label_replace(label_replace(label_replace(label_replace(label_replace(vector(1), \"id\", \"pi-root\", \"__name__\", \".*\"), \"title\", \"Pi root\", \"id\", \".*\"), \"subTitle\", \"workflow entry\", \"id\", \".*\"), \"mainStat\", \"entry\", \"id\", \".*\"), \"secondaryStat\", \"aggregate\", \"id\", \".*\"), \"color\", \"blue\", \"id\", \".*\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum by (agent_role) (max by (observme_instance_id, agent_role) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or sum(increase(observme_agent_runs_total[$__range])) by (agent_role) or sum(increase(observme_subagents_spawned_total[$__range])) by (agent_role)), \"id\", \"agent_$1\", \"agent_role\", \"(.+)\"), \"title\", \"Agent: $1\", \"agent_role\", \"(.+)\"), \"subTitle\", \"active or observed role\", \"agent_role\", \"(.+)\"), \"mainStat\", \"count\", \"agent_role\", \"(.+)\"), \"secondaryStat\", \"role\", \"agent_role\", \"(.+)\"), \"color\", \"green\", \"agent_role\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace(sum(increase(observme_subagents_spawned_total[$__range])) by (subagent_depth), \"id\", \"subagents_depth_$1\", \"subagent_depth\", \"(.+)\"), \"title\", \"Subagents depth $1\", \"subagent_depth\", \"(.+)\"), \"subtitle\", \"spawned in range\", \"subagent_depth\", \"(.+)\"), \"mainStat\", \"spawns\", \"subagent_depth\", \"(.+)\"), \"secondaryStat\", \"depth\", \"subagent_depth\", \"(.+)\"), \"color\", \"orange\", \"subagent_depth\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_subagent_spawn_failures_total[$__range])) by (error_class) > 0), \"id\", \"spawn_failure_$1\", \"error_class\", \"(.+)\"), \"title\", \"Spawn failure: $1\", \"error_class\", \"(.+)\"), \"subtitle\", \"failed spawns\", \"error_class\", \"(.+)\"), \"mainStat\", \"failures\", \"error_class\", \"(.+)\"), \"secondaryStat\", \"error\", \"error_class\", \"(.+)\"), \"color\", \"red\", \"error_class\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_orphan_agents_total[$__range])) by (reason) > 0), \"id\", \"orphan_$1\", \"reason\", \"(.+)\"), \"title\", \"Orphan: $1\", \"reason\", \"(.+)\"), \"subtitle\", \"lineage missing\", \"reason\", \"(.+)\"), \"mainStat\", \"orphans\", \"reason\", \"(.+)\"), \"secondaryStat\", \"reason\", \"reason\", \"(.+)\"), \"color\", \"red\", \"reason\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_trace_context_propagation_failures_total[$__range])) by (reason) > 0), \"id\", \"propagation_$1\", \"reason\", \"(.+)\"), \"title\", \"Propagation: $1\", \"reason\", \"(.+)\"), \"subtitle\", \"trace context failures\", \"reason\", \"(.+)\"), \"mainStat\", \"failures\", \"reason\", \"(.+)\"), \"secondaryStat\", \"reason\", \"reason\", \"(.+)\"), \"color\", \"red\", \"reason\", \"(.+)\")",
|
|
92
92
|
"format": "table",
|
|
93
93
|
"instant": true,
|
|
94
94
|
"legendFormat": "nodes",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"uid": "prometheus"
|
|
102
102
|
},
|
|
103
103
|
"editorMode": "code",
|
|
104
|
-
"expr": "label_join(label_replace(label_replace(label_replace(label_replace(label_replace((sum(
|
|
104
|
+
"expr": "label_join(label_replace(label_replace(label_replace(label_replace(label_replace((sum by (agent_role) (max by (observme_instance_id, agent_role) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or sum(increase(observme_agent_runs_total[$__range])) by (agent_role)), \"source\", \"pi-root\", \"agent_role\", \"(.+)\"), \"target\", \"agent_$1\", \"agent_role\", \"(.+)\"), \"mainStat\", \"count\", \"agent_role\", \"(.+)\"), \"secondaryStat\", \"active/runs\", \"agent_role\", \"(.+)\"), \"color\", \"gray\", \"agent_role\", \"(.+)\"), \"id\", \":\", \"source\", \"target\") or label_join(label_replace(label_replace(label_replace(label_replace(label_replace(sum(increase(observme_subagents_spawned_total[$__range])) by (agent_role, subagent_depth, spawn_type, spawn_reason), \"source\", \"agent_$1\", \"agent_role\", \"(.+)\"), \"target\", \"subagents_depth_$1\", \"subagent_depth\", \"(.+)\"), \"mainStat\", \"spawns\", \"agent_role\", \"(.+)\"), \"secondaryStat\", \"spawn_type/reason\", \"agent_role\", \"(.+)\"), \"color\", \"gray\", \"agent_role\", \"(.+)\"), \"id\", \":\", \"source\", \"target\", \"spawn_type\", \"spawn_reason\") or label_join(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_subagent_spawn_failures_total[$__range])) by (error_class) > 0), \"source\", \"pi-root\", \"error_class\", \"(.+)\"), \"target\", \"spawn_failure_$1\", \"error_class\", \"(.+)\"), \"mainStat\", \"failures\", \"error_class\", \"(.+)\"), \"secondaryStat\", \"spawn\", \"error_class\", \"(.+)\"), \"color\", \"red\", \"error_class\", \"(.+)\"), \"id\", \":\", \"source\", \"target\") or label_join(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_orphan_agents_total[$__range])) by (reason) > 0), \"source\", \"pi-root\", \"reason\", \"(.+)\"), \"target\", \"orphan_$1\", \"reason\", \"(.+)\"), \"mainStat\", \"orphans\", \"reason\", \"(.+)\"), \"secondaryStat\", \"lineage\", \"reason\", \"(.+)\"), \"color\", \"red\", \"reason\", \"(.+)\"), \"id\", \":\", \"source\", \"target\") or label_join(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_trace_context_propagation_failures_total[$__range])) by (reason) > 0), \"source\", \"pi-root\", \"reason\", \"(.+)\"), \"target\", \"propagation_$1\", \"reason\", \"(.+)\"), \"mainStat\", \"failures\", \"reason\", \"(.+)\"), \"secondaryStat\", \"trace context\", \"reason\", \"(.+)\"), \"color\", \"red\", \"reason\", \"(.+)\"), \"id\", \":\", \"source\", \"target\")",
|
|
105
105
|
"format": "table",
|
|
106
106
|
"instant": true,
|
|
107
107
|
"legendFormat": "edges",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"type": "prometheus",
|
|
138
138
|
"uid": "prometheus"
|
|
139
139
|
},
|
|
140
|
-
"description": "Aggregate delegation topology by bounded
|
|
140
|
+
"description": "Aggregate fleet delegation topology by bounded role, spawn reason, and resulting depth; it is not per-workflow truth or a single trace tree. Role nodes may combine canonical leased-current activity with selected-range run/spawn counts, while other values are selected-range aggregates. Clean shutdown removes leased activity after export/scrape propagation; after an ungraceful exit, leased activity converges to zero within the default 60-second lease plus one Prometheus scrape while raw claims may stay cached. Red health nodes and edges summarize spawn failures. /obs agents is local current-process child state; use Trace Journey for one execution.",
|
|
141
141
|
"fieldConfig": {
|
|
142
142
|
"defaults": {
|
|
143
143
|
"mappings": [],
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"uid": "prometheus"
|
|
181
181
|
},
|
|
182
182
|
"editorMode": "code",
|
|
183
|
-
"expr": "label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(
|
|
183
|
+
"expr": "label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum by (agent_role) (max by (observme_instance_id, agent_role) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or sum(increase(observme_agent_runs_total[$__range])) by (agent_role) or sum(increase(observme_subagents_spawned_total[$__range])) by (agent_role)), \"id\", \"agent_$1\", \"agent_role\", \"(.+)\"), \"title\", \"Agent: $1\", \"agent_role\", \"(.+)\"), \"subTitle\", \"active or observed role\", \"agent_role\", \"(.+)\"), \"mainStat\", \"count\", \"agent_role\", \"(.+)\"), \"secondaryStat\", \"role\", \"agent_role\", \"(.+)\"), \"color\", \"green\", \"agent_role\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace(sum(increase(observme_subagents_spawned_total[$__range])) by (spawn_reason), \"id\", \"spawn_reason_$1\", \"spawn_reason\", \"(.+)\"), \"title\", \"Spawn: $1\", \"spawn_reason\", \"(.+)\"), \"subTitle\", \"spawn reason\", \"spawn_reason\", \"(.+)\"), \"mainStat\", \"spawns\", \"spawn_reason\", \"(.+)\"), \"secondaryStat\", \"reason\", \"spawn_reason\", \"(.+)\"), \"color\", \"purple\", \"spawn_reason\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace(sum(increase(observme_subagents_spawned_total[$__range])) by (subagent_depth), \"id\", \"subagents_depth_$1\", \"subagent_depth\", \"(.+)\"), \"title\", \"Subagents depth $1\", \"subagent_depth\", \"(.+)\"), \"subTitle\", \"spawned in range\", \"subagent_depth\", \"(.+)\"), \"mainStat\", \"spawns\", \"subagent_depth\", \"(.+)\"), \"secondaryStat\", \"depth\", \"subagent_depth\", \"(.+)\"), \"color\", \"orange\", \"subagent_depth\", \"(.+)\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_subagent_spawn_failures_total[$__range])) > 0), \"id\", \"spawn-health\", \"__name__\", \".*\"), \"title\", \"Spawn failure health\", \"id\", \".*\"), \"subTitle\", \"failure-only aggregate\", \"id\", \".*\"), \"mainStat\", \"failures\", \"id\", \".*\"), \"secondaryStat\", \"health\", \"id\", \".*\"), \"color\", \"red\", \"id\", \".*\") or label_replace(label_replace(label_replace(label_replace(label_replace(label_replace((sum(increase(observme_subagent_spawn_failures_total[$__range])) by (error_class) > 0), \"id\", \"spawn_failure_$1\", \"error_class\", \"(.+)\"), \"title\", \"Spawn failure: $1\", \"error_class\", \"(.+)\"), \"subTitle\", \"failed spawns\", \"error_class\", \"(.+)\"), \"mainStat\", \"failures\", \"error_class\", \"(.+)\"), \"secondaryStat\", \"error class\", \"error_class\", \"(.+)\"), \"color\", \"red\", \"error_class\", \"(.+)\")",
|
|
184
184
|
"format": "table",
|
|
185
185
|
"instant": true,
|
|
186
186
|
"legendFormat": "nodes",
|
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
"type": "prometheus",
|
|
1066
1066
|
"uid": "prometheus"
|
|
1067
1067
|
},
|
|
1068
|
-
"description": "
|
|
1068
|
+
"description": "Canonical leased-active agents grouped by emitted agent_role, plus the fleet total. Clean shutdown reaches zero after export/scrape propagation; after a crash, SIGKILL, cancelled job, or runner loss, the leased total converges to zero within the default 60-second lease plus one Prometheus scrape even when raw claims stay cached. Zero can also mean healthy idle or a failed-closed lease, so compare Export Health. /obs agents reports current-process child state, not this aggregate fleet view. The total=100 reference matches the deployment-tunable ObservMeActiveAgentsStuckHigh threshold.",
|
|
1069
1069
|
"fieldConfig": {
|
|
1070
1070
|
"defaults": {
|
|
1071
1071
|
"color": {
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
"uid": "prometheus"
|
|
1116
1116
|
},
|
|
1117
1117
|
"editorMode": "code",
|
|
1118
|
-
"expr": "sum(
|
|
1118
|
+
"expr": "sum by (agent_role) (max by (observme_instance_id, agent_role) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or on() vector(0)",
|
|
1119
1119
|
"range": true,
|
|
1120
1120
|
"refId": "A",
|
|
1121
1121
|
"legendFormat": "{{agent_role}}"
|
|
@@ -1126,7 +1126,7 @@
|
|
|
1126
1126
|
"uid": "prometheus"
|
|
1127
1127
|
},
|
|
1128
1128
|
"editorMode": "code",
|
|
1129
|
-
"expr": "sum(observme_active_agents)",
|
|
1129
|
+
"expr": "sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or vector(0)",
|
|
1130
1130
|
"range": true,
|
|
1131
1131
|
"refId": "B",
|
|
1132
1132
|
"legendFormat": "total active agents"
|
|
@@ -1697,6 +1697,171 @@
|
|
|
1697
1697
|
"x": 0,
|
|
1698
1698
|
"y": 57
|
|
1699
1699
|
},
|
|
1700
|
+
"id": 105,
|
|
1701
|
+
"panels": [],
|
|
1702
|
+
"title": "Lease health diagnostics",
|
|
1703
|
+
"type": "row"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"datasource": {
|
|
1707
|
+
"type": "prometheus",
|
|
1708
|
+
"uid": "prometheus"
|
|
1709
|
+
},
|
|
1710
|
+
"description": "Diagnostic positive lifecycle claims before lease qualification. These are not live-agent totals and may remain cached after a crash, SIGKILL, cancelled job, or runner loss; leased activity converges to zero within the default 60-second lease plus one Prometheus scrape. Clean shutdown exports zero immediately. Compare Expired active claims and Export Health. /obs agents reports only current-process child state, not fleet liveness.",
|
|
1711
|
+
"fieldConfig": {
|
|
1712
|
+
"defaults": {
|
|
1713
|
+
"color": {
|
|
1714
|
+
"mode": "thresholds"
|
|
1715
|
+
},
|
|
1716
|
+
"mappings": [],
|
|
1717
|
+
"thresholds": {
|
|
1718
|
+
"mode": "absolute",
|
|
1719
|
+
"steps": [
|
|
1720
|
+
{
|
|
1721
|
+
"color": "green",
|
|
1722
|
+
"value": null
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
"unit": "short"
|
|
1727
|
+
},
|
|
1728
|
+
"overrides": []
|
|
1729
|
+
},
|
|
1730
|
+
"gridPos": {
|
|
1731
|
+
"h": 8,
|
|
1732
|
+
"w": 12,
|
|
1733
|
+
"x": 0,
|
|
1734
|
+
"y": 58
|
|
1735
|
+
},
|
|
1736
|
+
"id": 22,
|
|
1737
|
+
"links": [
|
|
1738
|
+
{
|
|
1739
|
+
"targetBlank": false,
|
|
1740
|
+
"title": "Open Export Health",
|
|
1741
|
+
"url": "/d/observme-export-health/observme-export-health?${__url_time_range}"
|
|
1742
|
+
}
|
|
1743
|
+
],
|
|
1744
|
+
"options": {
|
|
1745
|
+
"colorMode": "value",
|
|
1746
|
+
"graphMode": "area",
|
|
1747
|
+
"justifyMode": "auto",
|
|
1748
|
+
"orientation": "auto",
|
|
1749
|
+
"reduceOptions": {
|
|
1750
|
+
"calcs": [
|
|
1751
|
+
"lastNotNull"
|
|
1752
|
+
],
|
|
1753
|
+
"fields": "",
|
|
1754
|
+
"values": false
|
|
1755
|
+
},
|
|
1756
|
+
"showPercentChange": false,
|
|
1757
|
+
"textMode": "auto",
|
|
1758
|
+
"wideLayout": true
|
|
1759
|
+
},
|
|
1760
|
+
"pluginVersion": "11.1.0",
|
|
1761
|
+
"targets": [
|
|
1762
|
+
{
|
|
1763
|
+
"datasource": {
|
|
1764
|
+
"type": "prometheus",
|
|
1765
|
+
"uid": "prometheus"
|
|
1766
|
+
},
|
|
1767
|
+
"editorMode": "code",
|
|
1768
|
+
"expr": "sum(max by (observme_instance_id) (observme_active_agents > 0)) or vector(0)",
|
|
1769
|
+
"instant": true,
|
|
1770
|
+
"range": false,
|
|
1771
|
+
"refId": "A"
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
"title": "Raw active claims (diagnostic)",
|
|
1775
|
+
"type": "stat"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
"datasource": {
|
|
1779
|
+
"type": "prometheus",
|
|
1780
|
+
"uid": "prometheus"
|
|
1781
|
+
},
|
|
1782
|
+
"description": "Positive raw claims whose lease has expired. They are stale diagnostics and never contribute to leased active totals; clean shutdown normally avoids them, while ungraceful exits appear after the default 60-second lease plus one Prometheus scrape and may remain until Collector cleanup. Yellow at 1 and red at 5 are deployment-tunable. Compare Raw active claims and Export Health. /obs agents reports only current-process child state, not fleet liveness.",
|
|
1783
|
+
"fieldConfig": {
|
|
1784
|
+
"defaults": {
|
|
1785
|
+
"color": {
|
|
1786
|
+
"mode": "thresholds"
|
|
1787
|
+
},
|
|
1788
|
+
"mappings": [],
|
|
1789
|
+
"thresholds": {
|
|
1790
|
+
"mode": "absolute",
|
|
1791
|
+
"steps": [
|
|
1792
|
+
{
|
|
1793
|
+
"color": "green",
|
|
1794
|
+
"value": null
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"color": "yellow",
|
|
1798
|
+
"value": 1
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
"color": "red",
|
|
1802
|
+
"value": 5
|
|
1803
|
+
}
|
|
1804
|
+
]
|
|
1805
|
+
},
|
|
1806
|
+
"unit": "short"
|
|
1807
|
+
},
|
|
1808
|
+
"overrides": []
|
|
1809
|
+
},
|
|
1810
|
+
"gridPos": {
|
|
1811
|
+
"h": 8,
|
|
1812
|
+
"w": 12,
|
|
1813
|
+
"x": 12,
|
|
1814
|
+
"y": 58
|
|
1815
|
+
},
|
|
1816
|
+
"id": 23,
|
|
1817
|
+
"links": [
|
|
1818
|
+
{
|
|
1819
|
+
"targetBlank": false,
|
|
1820
|
+
"title": "Open Export Health",
|
|
1821
|
+
"url": "/d/observme-export-health/observme-export-health?${__url_time_range}"
|
|
1822
|
+
}
|
|
1823
|
+
],
|
|
1824
|
+
"options": {
|
|
1825
|
+
"colorMode": "value",
|
|
1826
|
+
"graphMode": "area",
|
|
1827
|
+
"justifyMode": "auto",
|
|
1828
|
+
"orientation": "auto",
|
|
1829
|
+
"reduceOptions": {
|
|
1830
|
+
"calcs": [
|
|
1831
|
+
"lastNotNull"
|
|
1832
|
+
],
|
|
1833
|
+
"fields": "",
|
|
1834
|
+
"values": false
|
|
1835
|
+
},
|
|
1836
|
+
"showPercentChange": false,
|
|
1837
|
+
"textMode": "auto",
|
|
1838
|
+
"wideLayout": true
|
|
1839
|
+
},
|
|
1840
|
+
"pluginVersion": "11.1.0",
|
|
1841
|
+
"targets": [
|
|
1842
|
+
{
|
|
1843
|
+
"datasource": {
|
|
1844
|
+
"type": "prometheus",
|
|
1845
|
+
"uid": "prometheus"
|
|
1846
|
+
},
|
|
1847
|
+
"editorMode": "code",
|
|
1848
|
+
"expr": "sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id) (observme_agent_lease_expires_unixtime_seconds <= time()))) or vector(0)",
|
|
1849
|
+
"instant": true,
|
|
1850
|
+
"range": false,
|
|
1851
|
+
"refId": "A"
|
|
1852
|
+
}
|
|
1853
|
+
],
|
|
1854
|
+
"title": "Expired active claims (diagnostic)",
|
|
1855
|
+
"type": "stat"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"collapsed": false,
|
|
1859
|
+
"gridPos": {
|
|
1860
|
+
"h": 1,
|
|
1861
|
+
"w": 24,
|
|
1862
|
+
"x": 0,
|
|
1863
|
+
"y": 66
|
|
1864
|
+
},
|
|
1700
1865
|
"id": 104,
|
|
1701
1866
|
"panels": [],
|
|
1702
1867
|
"title": "Lineage logs",
|
|
@@ -1768,7 +1933,7 @@
|
|
|
1768
1933
|
"h": 10,
|
|
1769
1934
|
"w": 24,
|
|
1770
1935
|
"x": 0,
|
|
1771
|
-
"y":
|
|
1936
|
+
"y": 67
|
|
1772
1937
|
},
|
|
1773
1938
|
"id": 6,
|
|
1774
1939
|
"options": {
|
|
@@ -103,11 +103,24 @@ groups:
|
|
|
103
103
|
runbook: "Severity guidance from production docs: warning."
|
|
104
104
|
- alert: ObservMeActiveAgentsStuckHigh
|
|
105
105
|
expr: >-
|
|
106
|
-
sum(
|
|
106
|
+
(sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id)
|
|
107
|
+
((observme_agent_lease_expires_unixtime_seconds > time()) and
|
|
108
|
+
(observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or vector(0)) > 100
|
|
107
109
|
for: 30m
|
|
108
110
|
labels:
|
|
109
111
|
severity: deployment-dependent
|
|
110
112
|
annotations:
|
|
111
113
|
summary: Active agents stuck high
|
|
112
|
-
description: ObservMe active-agent
|
|
113
|
-
runbook: "Severity guidance from production docs: depends on normal fleet size; tune per deployment."
|
|
114
|
+
description: ObservMe leased active-agent count remains above 100; expired, missing, and pathological leases fail closed.
|
|
115
|
+
runbook: "Severity guidance from production docs: depends on normal fleet size; tune per deployment. Compare leased activity with raw and expired claims plus Export Health."
|
|
116
|
+
- alert: ObservMeExpiredActiveAgentClaims
|
|
117
|
+
expr: >-
|
|
118
|
+
(sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id)
|
|
119
|
+
(observme_agent_lease_expires_unixtime_seconds <= time()))) or vector(0)) > 5
|
|
120
|
+
for: 15m
|
|
121
|
+
labels:
|
|
122
|
+
severity: deployment-dependent
|
|
123
|
+
annotations:
|
|
124
|
+
summary: Expired active-agent claims detected
|
|
125
|
+
description: More than five positive lifecycle claims have expired leases for 15 minutes; they are stale diagnostics and excluded from leased active totals.
|
|
126
|
+
runbook: "Deployment-tunable diagnostic: compare Raw active claims, Expired active claims, leased Active agents, and Export Health; investigate abrupt producer death, export gaps, and Collector cleanup. /obs agents is local child state, not fleet truth."
|
|
@@ -1075,7 +1075,7 @@
|
|
|
1075
1075
|
"type": "prometheus",
|
|
1076
1076
|
"uid": "prometheus"
|
|
1077
1077
|
},
|
|
1078
|
-
"description": "
|
|
1078
|
+
"description": "Canonical leased-active ObservMe runtimes. Clean shutdown reaches zero after export/scrape propagation; after a crash, SIGKILL, cancelled job, or runner loss, the leased total converges to zero within the default 60-second lease plus one Prometheus scrape even if raw claims stay cached. Zero can also mean healthy idle or a failed-closed lease, so check Export Health. /obs agents reports only current-process child state, not fleet liveness. Red at 100 matches the deployment-tunable ObservMeActiveAgentsStuckHigh threshold; yellow at 50 is an early warning.",
|
|
1079
1079
|
"fieldConfig": {
|
|
1080
1080
|
"defaults": {
|
|
1081
1081
|
"color": {
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
"uid": "prometheus"
|
|
1142
1142
|
},
|
|
1143
1143
|
"editorMode": "code",
|
|
1144
|
-
"expr": "sum(observme_active_agents) or vector(0)",
|
|
1144
|
+
"expr": "sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or vector(0)",
|
|
1145
1145
|
"range": true,
|
|
1146
1146
|
"refId": "A"
|
|
1147
1147
|
}
|
|
@@ -1998,7 +1998,7 @@
|
|
|
1998
1998
|
"type": "prometheus",
|
|
1999
1999
|
"uid": "prometheus"
|
|
2000
2000
|
},
|
|
2001
|
-
"description": "
|
|
2001
|
+
"description": "Canonical leased-active agents by emitted bounded role and environment. Clean shutdown reaches zero after export/scrape propagation; after an ungraceful exit, leased totals converge to zero within the default 60-second lease plus one Prometheus scrape while raw claims may remain cached. Depth is omitted because active signals do not emit subagent_depth. An unlabeled zero means healthy idle or no qualifying lease when Prometheus is reachable; compare Export Health. /obs agents is current-process child state, not this aggregate fleet view.",
|
|
2002
2002
|
"fieldConfig": {
|
|
2003
2003
|
"defaults": {
|
|
2004
2004
|
"color": {
|
|
@@ -2058,14 +2058,14 @@
|
|
|
2058
2058
|
"uid": "prometheus"
|
|
2059
2059
|
},
|
|
2060
2060
|
"editorMode": "code",
|
|
2061
|
-
"expr": "sum(
|
|
2061
|
+
"expr": "sum by (agent_role, environment) (max by (observme_instance_id, agent_role, environment) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or on() vector(0)",
|
|
2062
2062
|
"instant": true,
|
|
2063
|
-
"legendFormat": "{{agent_role}}
|
|
2063
|
+
"legendFormat": "{{agent_role}} / {{environment}}",
|
|
2064
2064
|
"range": false,
|
|
2065
2065
|
"refId": "A"
|
|
2066
2066
|
}
|
|
2067
2067
|
],
|
|
2068
|
-
"title": "Active agents by role/
|
|
2068
|
+
"title": "Active agents by role/environment",
|
|
2069
2069
|
"type": "bargauge"
|
|
2070
2070
|
},
|
|
2071
2071
|
{
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"type": "prometheus",
|
|
145
145
|
"uid": "prometheus"
|
|
146
146
|
},
|
|
147
|
-
"description": "
|
|
147
|
+
"description": "Canonical leased-active fleet total; Prometheus summary values are aggregate and are not filtered to the selected workflow. Clean shutdown reaches zero after export/scrape propagation; after a crash, SIGKILL, cancelled job, or runner loss, the leased total converges to zero within the default 60-second lease plus one Prometheus scrape even if raw claims stay cached. Zero can also mean healthy idle or a failed-closed lease, so check Export Health. /obs agents is current-process child state, not fleet liveness.",
|
|
148
148
|
"fieldConfig": {
|
|
149
149
|
"defaults": {
|
|
150
150
|
"color": {
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"uid": "prometheus"
|
|
196
196
|
},
|
|
197
197
|
"editorMode": "code",
|
|
198
|
-
"expr": "
|
|
198
|
+
"expr": "sum(max by (observme_instance_id) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or vector(0)",
|
|
199
199
|
"instant": true,
|
|
200
200
|
"range": false,
|
|
201
201
|
"refId": "A"
|
|
@@ -1005,7 +1005,7 @@
|
|
|
1005
1005
|
"type": "prometheus",
|
|
1006
1006
|
"uid": "prometheus"
|
|
1007
1007
|
},
|
|
1008
|
-
"description": "
|
|
1008
|
+
"description": "Aggregate fleet shape over time, not per-workflow truth: the leased-active role series is canonical current activity, while tree histograms summarize all matching telemetry without workflow or agent IDs as metric labels. Clean shutdown removes leased activity after export/scrape propagation; after an ungraceful exit, leased activity converges to zero within the default 60-second lease plus one Prometheus scrape while raw claims may remain cached. /obs agents is local current-process child state. Constant lines mirror the depth=5 and fan-out=20 alert thresholds.",
|
|
1009
1009
|
"fieldConfig": {
|
|
1010
1010
|
"defaults": {
|
|
1011
1011
|
"color": {
|
|
@@ -1083,7 +1083,7 @@
|
|
|
1083
1083
|
"uid": "prometheus"
|
|
1084
1084
|
},
|
|
1085
1085
|
"editorMode": "code",
|
|
1086
|
-
"expr": "sum(
|
|
1086
|
+
"expr": "sum by (agent_role) (max by (observme_instance_id, agent_role) ((observme_active_agents > 0) and on (observme_instance_id) ((observme_agent_lease_expires_unixtime_seconds > time()) and (observme_agent_lease_expires_unixtime_seconds <= time() + 305)))) or on() vector(0)",
|
|
1087
1087
|
"legendFormat": "active {{agent_role}}",
|
|
1088
1088
|
"range": true,
|
|
1089
1089
|
"refId": "A"
|
|
@@ -647,27 +647,35 @@ histogram_quantile(0.95, sum(rate(observme_subagent_spawn_duration_ms_bucket[$__
|
|
|
647
647
|
|
|
648
648
|
```text
|
|
649
649
|
observme_active_agents
|
|
650
|
+
observme_agent_lease_expires_unixtime_seconds
|
|
650
651
|
observme_agent_tree_depth
|
|
651
652
|
observme_agent_tree_width
|
|
652
653
|
observme_agent_fanout_count
|
|
653
654
|
```
|
|
654
655
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
```text
|
|
658
|
-
agent_role
|
|
659
|
-
subagent_depth
|
|
660
|
-
```
|
|
656
|
+
The active claim and lease carry the bounded `agent_role` and `environment` dimensions plus generated resource-instance identity normalized by the Collector to `observme_instance_id`. They do not currently carry `subagent_depth`; never derive a replacement depth label from workflow, session, logical-agent, trace, span, or job-run IDs. The tree histograms retain their documented bounded tree dimensions.
|
|
661
657
|
|
|
662
658
|
Dashboard examples:
|
|
663
659
|
|
|
664
660
|
```promql
|
|
665
|
-
sum
|
|
661
|
+
sum by (agent_role) (
|
|
662
|
+
max by (observme_instance_id, agent_role) (
|
|
663
|
+
(observme_active_agents > 0)
|
|
664
|
+
and on (observme_instance_id)
|
|
665
|
+
(
|
|
666
|
+
(observme_agent_lease_expires_unixtime_seconds > time())
|
|
667
|
+
and
|
|
668
|
+
(observme_agent_lease_expires_unixtime_seconds <= time() + 305)
|
|
669
|
+
)
|
|
670
|
+
)
|
|
671
|
+
) or on() vector(0)
|
|
666
672
|
histogram_quantile(0.95, sum(rate(observme_agent_tree_depth_bucket[$__rate_interval])) by (subagent_depth, le))
|
|
667
673
|
histogram_quantile(0.95, sum(rate(observme_agent_tree_width_bucket[$__rate_interval])) by (subagent_depth, le))
|
|
668
674
|
histogram_quantile(0.95, sum(rate(observme_agent_fanout_count_bucket[$__rate_interval])) by (subagent_depth, le))
|
|
669
675
|
```
|
|
670
676
|
|
|
677
|
+
Use the canonical total, role, environment, diagnostics, and migration guidance in [`reference/09-dashboards-alerts-slos.md` §1.3](reference/09-dashboards-alerts-slos.md#13-active-agent-leased-state-contract); raw active-claim sums are not current-liveness queries after ungraceful termination.
|
|
678
|
+
|
|
671
679
|
### Lineage health metrics
|
|
672
680
|
|
|
673
681
|
```text
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ObservMe Compatibility Matrix
|
|
2
2
|
|
|
3
|
-
Last updated: 2026-07-
|
|
3
|
+
Last updated: 2026-07-14
|
|
4
4
|
|
|
5
|
-
This matrix records the ObservMe runtime and observability-stack versions
|
|
5
|
+
This matrix records the ObservMe runtime and observability-stack versions exercised or pinned for the current release line. A component is marked **validated** only when the named command actually exercised it; configured CI targets remain distinct from completed local or workflow evidence.
|
|
6
6
|
|
|
7
7
|
## Validation record
|
|
8
8
|
|
|
@@ -12,6 +12,14 @@ This matrix records the ObservMe runtime and observability-stack versions that h
|
|
|
12
12
|
| 2026-07-07 | Local Docker 29.5.2 with Collector Contrib 0.104.0 | `npm run test:integration:collector` | Starts a local debug-exporter Collector container, exports representative ObservMe traces/metrics/logs, and asserts default-disabled content capture is absent. |
|
|
13
13
|
| 2026-07-07 | Local Docker 29.5.2 with the pinned Grafana stack | `npm run test:integration:grafana-stack` | Starts `observability-stack/` services, exports representative ObservMe telemetry, queries Tempo by trace ID and lineage attributes, queries Loki by session ID, queries Prometheus token totals, and validates Grafana dashboard provisioning imports. |
|
|
14
14
|
| Continuous integration target | GitHub Actions `ubuntu-latest`, Node.js 22.19.0 | `npm ci --ignore-scripts` then `npm run validate` | CI target from `.github/workflows/ci.yml`; record the workflow run URL here after each release validation. |
|
|
15
|
+
| Lease cancellation CI profile (configured 2026-07-14) | GitHub-hosted Linux `ubuntu-latest` (exact `ImageOS`/`ImageVersion` recorded in the Actions runner log); Node.js 22.19.0; Collector Contrib 0.104.0; Prometheus 2.53.1; Grafana 11.1.0 | `npm run test:active-agent-lease:contracts` then `npm run test:integration:active-agent-lease` | The bounded `lease-cancellation` job validates clean shutdown, `SIGTERM`, and cancellation-oriented `SIGKILL` convergence against the pinned Collector and Prometheus without secrets or a Grafana dependency. Grafana 11.1.0 is the recorded dashboard compatibility baseline validated separately by `npm run test:integration:grafana-stack`. `if: always()` cleanup is best effort; lease expiry is the asserted correctness mechanism. |
|
|
16
|
+
| 2026-07-14 | Local Node.js v26.0.0, npm 11.12.1 | `npm run validate` | Passed 493 unit/contract tests plus typecheck, ESLint, formatting, script, package-content, packaged-install, handler, Pi lifecycle, and Pi runtime checks for the lease release candidate. |
|
|
17
|
+
| 2026-07-14 | Local Docker 29.5.2, Compose 5.1.4, Collector Contrib 0.104.0 | `npm run test:integration:collector`; Compose config; pinned Collector `validate` | Passed representative OTLP export, Compose interpolation, and the shipped Collector config validation. |
|
|
18
|
+
| 2026-07-14 | Local Docker 29.5.2, Collector Contrib 0.104.0, Prometheus 2.53.1 | `npm run test:integration:active-agent-lease` | Passed clean shutdown, `SIGTERM`, and cancellation-oriented `SIGKILL`; the raw claim remained cached while leased activity converged without Collector restart. Labeled containers and the network were absent after cleanup. |
|
|
19
|
+
| 2026-07-14 | Local Docker 29.5.2 with the pinned Grafana stack | `npm run test:integration:grafana-stack` | Unrelated pre-existing broad-stack blocker remains: this run timed out with an empty Prometheus total-token vector. That token path does not validate active-agent leases. Cleanup removed all integration containers and networks; focused lease evidence is unaffected. |
|
|
20
|
+
| 2026-07-14 | npm package dry run for `@senad-d/observme` 0.1.3 | `npm run pack:dry-run` | Passed with 124 files; metric source, dashboards, alerts, examples, target docs, and `skills/observme-docs/SKILL.md` were present. |
|
|
21
|
+
|
|
22
|
+
Active-agent lease interpretation additionally requires producer and Prometheus wall clocks to remain within 5 seconds. GitHub-hosted runners satisfy this expectation. Self-hosted runners are supported only with reliable NTP or equivalent synchronization; clock health must be monitored separately from the ObservMe version matrix.
|
|
15
23
|
|
|
16
24
|
## Runtime and library matrix
|
|
17
25
|
|
package/docs/configuration.md
CHANGED
|
@@ -24,6 +24,9 @@ Edit the project config file (`.pi/observme.yaml` in the standard distribution)
|
|
|
24
24
|
- `privacy` — redaction, unsafe-capture acknowledgement, insecure transport, hash salt env var, and path handling. Keep `redactionEnabled: true`; set `allowUnsafeCapture: true` only when you intentionally accept unredacted sensitive-content export from this trusted project. Live telemetry and `/obs backfill` use the same policy: disabled capture omits content, enabled redaction redacts then truncates, redaction failures drop content, and `redactionEnabled: false` with `allowUnsafeCapture: true` exports raw truncated content.
|
|
25
25
|
- `query.grafana` — Grafana URL, datasource UIDs, TLS, and IPv4 transport settings for `/obs` query commands.
|
|
26
26
|
- `query.links.traceUrlTemplate` — the Grafana Explore trace-link template used by `/obs trace` and `/obs link`.
|
|
27
|
+
- `metrics.activeAgentLeaseDurationMillis` — how long the last exported active-agent lease remains valid. The default is `60000` ms, the supported range is `10000`–`300000` ms, and the value must be at least `(2 * metrics.exportIntervalMillis) + 5000` ms. `OBSERVME_ACTIVE_AGENT_LEASE_DURATION_MS` overrides YAML through the normal precedence rules.
|
|
28
|
+
|
|
29
|
+
The shipped dashboards and alerts combine a positive `observme_active_agents` lifecycle claim with a current lease; raw active-claim sums are diagnostic only after an ungraceful exit. Clean shutdown reaches zero after normal export/scrape propagation. Crash, `SIGKILL`, forced GitHub Actions cancellation, or runner loss converges within the lease plus up to 5 seconds of supported clock skew and one Prometheus scrape/evaluation interval, without restarting the Collector. Keep producer and Prometheus clocks synchronized within 5 seconds; GitHub-hosted runners meet this expectation, while self-hosted runners require reliable NTP or an equivalent time service.
|
|
27
30
|
|
|
28
31
|
Keep credentials out of YAML. Reference environment variables such as `OBSERVME_OTLP_TOKEN`, `OBSERVME_GRAFANA_TOKEN`, `OBSERVME_GRAFANA_PASSWORD`, and `OBSERVME_HASH_SALT`, then set those values in the shell or a trusted project `.env` file. When any content capture flag is enabled with `privacy.redactionEnabled: true`, `OBSERVME_HASH_SALT` must be set before the event occurs; otherwise content capture fails closed and emits `redaction.failed` diagnostics instead of conversation rows.
|
|
29
32
|
|
|
@@ -45,3 +48,5 @@ Invalid or unsafe merged configuration falls back to safe defaults. `/obs status
|
|
|
45
48
|
- [Example configurations](../examples/README.md)
|
|
46
49
|
- [Security, privacy, and redaction](reference/06-security-privacy-redaction.md)
|
|
47
50
|
- [Grafana and `/obs` validation flow](validation-flow.md)
|
|
51
|
+
- [Canonical active-agent queries and raw-query migration](reference/09-dashboards-alerts-slos.md#131-canonical-active-agent-promql)
|
|
52
|
+
- [Active-lease deployment and troubleshooting runbook](reference/11-deployment-runbooks.md)
|