@smithers-orchestrator/observability 0.16.9 → 0.18.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/package.json +7 -3
- package/src/metrics/index.js +16 -0
- package/src/metrics/memoryFactReads.js +3 -0
- package/src/metrics/memoryFactWrites.js +3 -0
- package/src/metrics/memoryMessageSaves.js +3 -0
- package/src/metrics/memoryRecallDuration.js +9 -0
- package/src/metrics/memoryRecallQueries.js +3 -0
- package/src/metrics/openApiToolCallErrorsTotal.js +3 -0
- package/src/metrics/openApiToolCallsTotal.js +3 -0
- package/src/metrics/openApiToolDuration.js +10 -0
- package/src/metrics/replaysStarted.js +3 -0
- package/src/metrics/runForksCreated.js +3 -0
- package/src/metrics/scorerDuration.js +9 -0
- package/src/metrics/scorersFailed.js +3 -0
- package/src/metrics/scorersFinished.js +3 -0
- package/src/metrics/scorersStarted.js +3 -0
- package/src/metrics/smithersMetricCatalog.js +16 -5
- package/src/metrics/snapshotDuration.js +9 -0
- package/src/metrics/snapshotsCaptured.js +3 -0
- package/src/metrics/trackEvent.js +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithers-orchestrator/observability",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Concrete Smithers metrics, logging, tracing, and observability integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,8 +29,12 @@
|
|
|
29
29
|
"@effect/platform": "^0.96.0",
|
|
30
30
|
"@effect/platform-bun": "^0.89.0",
|
|
31
31
|
"effect": "^3.21.1",
|
|
32
|
-
"@smithers-orchestrator/agents": "0.
|
|
33
|
-
"@smithers-orchestrator/driver": "0.
|
|
32
|
+
"@smithers-orchestrator/agents": "0.18.0",
|
|
33
|
+
"@smithers-orchestrator/driver": "0.18.0",
|
|
34
|
+
"@smithers-orchestrator/openapi": "0.18.0",
|
|
35
|
+
"@smithers-orchestrator/memory": "0.18.0",
|
|
36
|
+
"@smithers-orchestrator/scorers": "0.18.0",
|
|
37
|
+
"@smithers-orchestrator/time-travel": "0.18.0"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
36
40
|
"@types/bun": "latest",
|
package/src/metrics/index.js
CHANGED
|
@@ -95,6 +95,18 @@ export { devtoolsBackpressureDisconnectTotal } from "./devtoolsBackpressureDisco
|
|
|
95
95
|
export { eventsEmittedTotal } from "./eventsEmittedTotal.js";
|
|
96
96
|
export { taskHeartbeatsTotal } from "./taskHeartbeatsTotal.js";
|
|
97
97
|
export { taskHeartbeatTimeoutTotal } from "./taskHeartbeatTimeoutTotal.js";
|
|
98
|
+
export { memoryFactReads } from "./memoryFactReads.js";
|
|
99
|
+
export { memoryFactWrites } from "./memoryFactWrites.js";
|
|
100
|
+
export { memoryRecallQueries } from "./memoryRecallQueries.js";
|
|
101
|
+
export { memoryMessageSaves } from "./memoryMessageSaves.js";
|
|
102
|
+
export { openApiToolCallsTotal } from "./openApiToolCallsTotal.js";
|
|
103
|
+
export { openApiToolCallErrorsTotal } from "./openApiToolCallErrorsTotal.js";
|
|
104
|
+
export { scorersStarted } from "./scorersStarted.js";
|
|
105
|
+
export { scorersFinished } from "./scorersFinished.js";
|
|
106
|
+
export { scorersFailed } from "./scorersFailed.js";
|
|
107
|
+
export { snapshotsCaptured } from "./snapshotsCaptured.js";
|
|
108
|
+
export { runForksCreated } from "./runForksCreated.js";
|
|
109
|
+
export { replaysStarted } from "./replaysStarted.js";
|
|
98
110
|
// Gauges
|
|
99
111
|
export { activeRuns } from "./activeRuns.js";
|
|
100
112
|
export { activeNodes } from "./activeNodes.js";
|
|
@@ -141,6 +153,10 @@ export { sandboxTransportDurationMs } from "./sandboxTransportDurationMs.js";
|
|
|
141
153
|
export { sandboxPatchCount } from "./sandboxPatchCount.js";
|
|
142
154
|
export { heartbeatDataSizeBytes } from "./heartbeatDataSizeBytes.js";
|
|
143
155
|
export { heartbeatIntervalMs } from "./heartbeatIntervalMs.js";
|
|
156
|
+
export { memoryRecallDuration } from "./memoryRecallDuration.js";
|
|
157
|
+
export { openApiToolDuration } from "./openApiToolDuration.js";
|
|
158
|
+
export { scorerDuration } from "./scorerDuration.js";
|
|
159
|
+
export { snapshotDuration } from "./snapshotDuration.js";
|
|
144
160
|
export { devtoolsSnapshotBuildMs } from "./devtoolsSnapshotBuildMs.js";
|
|
145
161
|
export { devtoolsDeltaBuildMs } from "./devtoolsDeltaBuildMs.js";
|
|
146
162
|
export { devtoolsEventBytes } from "./devtoolsEventBytes.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Metric, MetricBoundaries } from "effect";
|
|
2
|
+
|
|
3
|
+
const durationBuckets = MetricBoundaries.exponential({
|
|
4
|
+
start: 1,
|
|
5
|
+
factor: 2,
|
|
6
|
+
count: 14,
|
|
7
|
+
}); // ~1ms to ~8s
|
|
8
|
+
|
|
9
|
+
export const memoryRecallDuration = Metric.histogram("smithers.memory.recall_duration_ms", durationBuckets);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Metric, MetricBoundaries } from "effect";
|
|
2
|
+
|
|
3
|
+
const toolBuckets = MetricBoundaries.exponential({
|
|
4
|
+
start: 10,
|
|
5
|
+
factor: 2,
|
|
6
|
+
count: 14,
|
|
7
|
+
}); // ~10ms to ~80s
|
|
8
|
+
|
|
9
|
+
/** @type {import("effect").Metric.Metric<import("effect/MetricKeyType").MetricKeyType.Histogram, number, import("effect/MetricState").MetricState.Histogram>} */
|
|
10
|
+
export const openApiToolDuration = Metric.histogram("smithers.openapi.tool_duration_ms", toolBuckets);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Metric, MetricBoundaries } from "effect";
|
|
2
|
+
|
|
3
|
+
const scorerBuckets = MetricBoundaries.exponential({
|
|
4
|
+
start: 10,
|
|
5
|
+
factor: 2,
|
|
6
|
+
count: 14,
|
|
7
|
+
}); // ~10ms to ~80s
|
|
8
|
+
|
|
9
|
+
export const scorerDuration = Metric.histogram("smithers.scorer.duration_ms", scorerBuckets);
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { toPrometheusMetricName } from "./toPrometheusMetricName.js";
|
|
2
2
|
import { durationBuckets, fastBuckets, toolBuckets, tokenBuckets, contextWindowBuckets, sizeBuckets, carriedStateSizeBuckets, ancestryDepthBuckets, } from "./_buckets.js";
|
|
3
|
-
// External package metrics
|
|
4
|
-
import { memoryFactReads, memoryFactWrites, memoryRecallDuration, memoryRecallQueries, memoryMessageSaves, } from "@smithers-orchestrator/memory/metrics";
|
|
5
|
-
import { openApiToolCallsTotal, openApiToolCallErrorsTotal, openApiToolDuration, } from "@smithers-orchestrator/openapi/metrics";
|
|
6
|
-
import { scorerDuration, scorersFailed, scorersFinished, scorersStarted, } from "@smithers-orchestrator/scorers/metrics";
|
|
7
|
-
import { replaysStarted, runForksCreated, snapshotDuration, snapshotsCaptured, } from "@smithers-orchestrator/time-travel/metrics";
|
|
8
3
|
// Local metric instances
|
|
9
4
|
import { runsTotal } from "./runsTotal.js";
|
|
10
5
|
import { nodesStarted } from "./nodesStarted.js";
|
|
@@ -77,6 +72,22 @@ import { gatewayWebhooksRejectedTotal } from "./gatewayWebhooksRejectedTotal.js"
|
|
|
77
72
|
import { eventsEmittedTotal } from "./eventsEmittedTotal.js";
|
|
78
73
|
import { taskHeartbeatsTotal } from "./taskHeartbeatsTotal.js";
|
|
79
74
|
import { taskHeartbeatTimeoutTotal } from "./taskHeartbeatTimeoutTotal.js";
|
|
75
|
+
import { memoryFactReads } from "./memoryFactReads.js";
|
|
76
|
+
import { memoryFactWrites } from "./memoryFactWrites.js";
|
|
77
|
+
import { memoryRecallDuration } from "./memoryRecallDuration.js";
|
|
78
|
+
import { memoryRecallQueries } from "./memoryRecallQueries.js";
|
|
79
|
+
import { memoryMessageSaves } from "./memoryMessageSaves.js";
|
|
80
|
+
import { openApiToolCallsTotal } from "./openApiToolCallsTotal.js";
|
|
81
|
+
import { openApiToolCallErrorsTotal } from "./openApiToolCallErrorsTotal.js";
|
|
82
|
+
import { openApiToolDuration } from "./openApiToolDuration.js";
|
|
83
|
+
import { scorerDuration } from "./scorerDuration.js";
|
|
84
|
+
import { scorersFailed } from "./scorersFailed.js";
|
|
85
|
+
import { scorersFinished } from "./scorersFinished.js";
|
|
86
|
+
import { scorersStarted } from "./scorersStarted.js";
|
|
87
|
+
import { replaysStarted } from "./replaysStarted.js";
|
|
88
|
+
import { runForksCreated } from "./runForksCreated.js";
|
|
89
|
+
import { snapshotDuration } from "./snapshotDuration.js";
|
|
90
|
+
import { snapshotsCaptured } from "./snapshotsCaptured.js";
|
|
80
91
|
import { activeRuns } from "./activeRuns.js";
|
|
81
92
|
import { activeNodes } from "./activeNodes.js";
|
|
82
93
|
import { schedulerQueueDepth } from "./schedulerQueueDepth.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Metric, MetricBoundaries } from "effect";
|
|
2
|
+
|
|
3
|
+
const snapshotBuckets = MetricBoundaries.exponential({
|
|
4
|
+
start: 1,
|
|
5
|
+
factor: 2,
|
|
6
|
+
count: 12,
|
|
7
|
+
}); // ~1ms to ~2s
|
|
8
|
+
|
|
9
|
+
export const snapshotDuration = Metric.histogram("smithers.snapshot.duration_ms", snapshotBuckets);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Effect, Metric } from "effect";
|
|
2
|
-
import { memoryFactWrites
|
|
3
|
-
import {
|
|
2
|
+
import { memoryFactWrites } from "./memoryFactWrites.js";
|
|
3
|
+
import { memoryRecallQueries } from "./memoryRecallQueries.js";
|
|
4
|
+
import { memoryMessageSaves } from "./memoryMessageSaves.js";
|
|
5
|
+
import { openApiToolCallsTotal } from "./openApiToolCallsTotal.js";
|
|
6
|
+
import { openApiToolCallErrorsTotal } from "./openApiToolCallErrorsTotal.js";
|
|
7
|
+
import { openApiToolDuration } from "./openApiToolDuration.js";
|
|
4
8
|
import { runsTotal } from "./runsTotal.js";
|
|
5
9
|
import { nodesStarted } from "./nodesStarted.js";
|
|
6
10
|
import { nodesFinished } from "./nodesFinished.js";
|