@smthrs/observability 0.34.0 → 1.0.0-rc.3
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/CHANGELOG.md +56 -0
- package/LICENSE +1 -1
- package/README.md +84 -0
- package/dist/cjs/BrowserOtel.d.ts +37 -0
- package/dist/cjs/BrowserOtel.d.ts.map +1 -0
- package/dist/cjs/BrowserOtel.js +47 -0
- package/dist/cjs/BrowserOtel.js.map +7 -0
- package/dist/cjs/Endpoint.d.ts +70 -0
- package/dist/cjs/Endpoint.d.ts.map +1 -0
- package/dist/cjs/Endpoint.js +85 -0
- package/dist/cjs/Endpoint.js.map +7 -0
- package/dist/cjs/JournalLogger.d.ts +232 -0
- package/dist/cjs/JournalLogger.d.ts.map +1 -0
- package/dist/cjs/JournalLogger.js +388 -0
- package/dist/cjs/JournalLogger.js.map +7 -0
- package/dist/cjs/Logger.d.ts +55 -0
- package/dist/cjs/Logger.d.ts.map +1 -0
- package/dist/cjs/Logger.js +72 -0
- package/dist/cjs/Logger.js.map +7 -0
- package/dist/cjs/Metric.d.ts +67 -0
- package/dist/cjs/Metric.d.ts.map +1 -0
- package/dist/cjs/Metric.js +68 -0
- package/dist/cjs/Metric.js.map +7 -0
- package/dist/cjs/NodeOtel.d.ts +42 -0
- package/dist/cjs/NodeOtel.d.ts.map +1 -0
- package/dist/cjs/NodeOtel.js +78 -0
- package/dist/cjs/NodeOtel.js.map +7 -0
- package/dist/cjs/Otel.d.ts +62 -0
- package/dist/cjs/Otel.d.ts.map +1 -0
- package/dist/cjs/Otel.js +75 -0
- package/dist/cjs/Otel.js.map +7 -0
- package/dist/cjs/Otlp.d.ts +200 -0
- package/dist/cjs/Otlp.d.ts.map +1 -0
- package/dist/cjs/Otlp.js +235 -0
- package/dist/cjs/Otlp.js.map +7 -0
- package/dist/cjs/Resource.d.ts +162 -0
- package/dist/cjs/Resource.d.ts.map +1 -0
- package/dist/cjs/Resource.js +186 -0
- package/dist/cjs/Resource.js.map +7 -0
- package/dist/cjs/index.d.ts +61 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/schemaIssuePath.d.ts +31 -0
- package/dist/cjs/internal/schemaIssuePath.d.ts.map +1 -0
- package/dist/cjs/internal/schemaIssuePath.js +49 -0
- package/dist/cjs/internal/schemaIssuePath.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/BrowserOtel.d.ts +37 -0
- package/dist/esm/BrowserOtel.d.ts.map +1 -0
- package/dist/esm/BrowserOtel.js +24 -0
- package/dist/esm/BrowserOtel.js.map +1 -0
- package/dist/esm/Endpoint.d.ts +70 -0
- package/dist/esm/Endpoint.d.ts.map +1 -0
- package/dist/esm/Endpoint.js +110 -0
- package/dist/esm/Endpoint.js.map +1 -0
- package/dist/esm/JournalLogger.d.ts +232 -0
- package/dist/esm/JournalLogger.d.ts.map +1 -0
- package/dist/esm/JournalLogger.js +482 -0
- package/dist/esm/JournalLogger.js.map +1 -0
- package/dist/esm/Logger.d.ts +55 -0
- package/dist/esm/Logger.d.ts.map +1 -0
- package/dist/esm/Logger.js +60 -0
- package/dist/esm/Logger.js.map +1 -0
- package/dist/esm/Metric.d.ts +67 -0
- package/dist/esm/Metric.d.ts.map +1 -0
- package/dist/esm/Metric.js +80 -0
- package/dist/esm/Metric.js.map +1 -0
- package/dist/esm/NodeOtel.d.ts +42 -0
- package/dist/esm/NodeOtel.d.ts.map +1 -0
- package/dist/esm/NodeOtel.js +56 -0
- package/dist/esm/NodeOtel.js.map +1 -0
- package/dist/esm/Otel.d.ts +62 -0
- package/dist/esm/Otel.d.ts.map +1 -0
- package/dist/esm/Otel.js +51 -0
- package/dist/esm/Otel.js.map +1 -0
- package/dist/esm/Otlp.d.ts +200 -0
- package/dist/esm/Otlp.d.ts.map +1 -0
- package/dist/esm/Otlp.js +350 -0
- package/dist/esm/Otlp.js.map +1 -0
- package/dist/esm/Resource.d.ts +162 -0
- package/dist/esm/Resource.d.ts.map +1 -0
- package/dist/esm/Resource.js +237 -0
- package/dist/esm/Resource.js.map +1 -0
- package/dist/esm/index.d.ts +61 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +61 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/schemaIssuePath.d.ts +31 -0
- package/dist/esm/internal/schemaIssuePath.d.ts.map +1 -0
- package/dist/esm/internal/schemaIssuePath.js +59 -0
- package/dist/esm/internal/schemaIssuePath.js.map +1 -0
- package/docs/README.md +162 -0
- package/docs/api.md +768 -0
- package/docs/concepts/instrumentation-and-export.md +68 -0
- package/docs/concepts/layer-map.md +72 -0
- package/docs/concepts/validated-acquisition.md +105 -0
- package/docs/guides/export-to-a-collector.md +167 -0
- package/docs/guides/forward-logs-to-the-journal.md +226 -0
- package/docs/guides/install-a-logger.md +111 -0
- package/docs/guides/read-runtime-metrics.md +83 -0
- package/docs/guides/testing.md +134 -0
- package/docs/guides/wire-an-opentelemetry-sdk.md +220 -0
- package/docs/installation.md +98 -0
- package/docs/quickstart.md +145 -0
- package/docs/troubleshooting.md +168 -0
- package/package.json +221 -32
- package/src/BrowserOtel.ts +51 -0
- package/src/Endpoint.ts +131 -0
- package/src/JournalLogger.ts +596 -0
- package/src/Logger.ts +106 -0
- package/src/Metric.ts +88 -0
- package/src/NodeOtel.ts +90 -0
- package/src/Otel.ts +117 -0
- package/src/Otlp.ts +477 -0
- package/src/Resource.ts +324 -0
- package/src/index.ts +67 -0
- package/src/internal/schemaIssuePath.ts +65 -0
- package/docker-compose.otel.yml +0 -104
- package/grafana/dashboards/smithers-dashboard.json +0 -453
- package/grafana/provisioning/dashboards/dashboards.yml +0 -12
- package/grafana/provisioning/datasources/datasources.yml +0 -49
- package/loki/loki-config.yaml +0 -35
- package/otel-collector-config.yml +0 -38
- package/prometheus/prometheus.yml +0 -8
- package/src/MetricName.ts +0 -1
- package/src/MetricsServiceLive.js +0 -9
- package/src/README.md +0 -28
- package/src/ResolvedSmithersObservabilityOptions.ts +0 -12
- package/src/SmithersEvent.ts +0 -798
- package/src/SmithersLogFormat.ts +0 -1
- package/src/SmithersMetricDefinition.ts +0 -15
- package/src/SmithersMetricType.ts +0 -1
- package/src/SmithersMetricUnit.ts +0 -1
- package/src/SmithersObservability.js +0 -15
- package/src/SmithersObservabilityOptions.ts +0 -12
- package/src/SmithersObservabilityService.ts +0 -13
- package/src/_coreCorrelation/CorrelationContext.ts +0 -10
- package/src/_coreCorrelation/CorrelationContextLive.js +0 -11
- package/src/_coreCorrelation/CorrelationContextService.js +0 -15
- package/src/_coreCorrelation/CorrelationContextServiceShape.ts +0 -12
- package/src/_coreCorrelation/CorrelationPatch.ts +0 -3
- package/src/_coreCorrelation/README.md +0 -20
- package/src/_coreCorrelation/_correlationStorage.js +0 -4
- package/src/_coreCorrelation/correlationContextFiberRef.js +0 -5
- package/src/_coreCorrelation/correlationContextToLogAnnotations.js +0 -18
- package/src/_coreCorrelation/getCurrentCorrelationContext.js +0 -9
- package/src/_coreCorrelation/getCurrentCorrelationContextEffect.js +0 -11
- package/src/_coreCorrelation/index.js +0 -14
- package/src/_coreCorrelation/mergeCorrelationContext.js +0 -51
- package/src/_coreCorrelation/runWithCorrelationContext.js +0 -14
- package/src/_coreCorrelation/updateCurrentCorrelationContext.js +0 -17
- package/src/_coreCorrelation/withCorrelationContext.js +0 -38
- package/src/_coreCorrelation/withCurrentCorrelationContext.js +0 -11
- package/src/_coreMetrics.js +0 -14
- package/src/_coreMetricsShape.ts +0 -44
- package/src/_corePrometheus.js +0 -91
- package/src/_corePrometheusShape.ts +0 -11
- package/src/_coreTracing.js +0 -132
- package/src/_coreTracingShape.ts +0 -17
- package/src/_otelLogBuilders.js +0 -102
- package/src/_sessionFileResolvers.js +0 -164
- package/src/_smithersSpanAttributeAliases.js +0 -19
- package/src/_smithersTraceSpanStorage.js +0 -3
- package/src/_traceEventNormalizers.js +0 -499
- package/src/_traceRedaction.js +0 -162
- package/src/agentSessionEventToOtelLogRecord.js +0 -55
- package/src/agentTrace.ts +0 -144
- package/src/agentTraceCapabilities.js +0 -151
- package/src/annotateSmithersTrace.js +0 -11
- package/src/canonicalTraceEventToOtelLogRecord.js +0 -55
- package/src/correlation.js +0 -56
- package/src/createSmithersObservabilityLayer.js +0 -59
- package/src/createSmithersOtelLayer.js +0 -23
- package/src/createSmithersRuntimeLayer.js +0 -2
- package/src/detectAgentFamily.js +0 -26
- package/src/detectCaptureMode.js +0 -29
- package/src/emitOtelLogRecord.js +0 -19
- package/src/getCurrentSmithersTraceAnnotations.js +0 -14
- package/src/getCurrentSmithersTraceSpan.js +0 -7
- package/src/index.d.ts +0 -1343
- package/src/index.js +0 -136
- package/src/kindPhase.js +0 -17
- package/src/logging.js +0 -248
- package/src/makeSmithersSpanAttributes.js +0 -20
- package/src/metrics/README.md +0 -22
- package/src/metrics/SmithersMetricDefinition.ts +0 -17
- package/src/metrics/SmithersMetricType.ts +0 -1
- package/src/metrics/SmithersMetricUnit.ts +0 -1
- package/src/metrics/_asyncExternalWaitCounts.js +0 -4
- package/src/metrics/_buckets.js +0 -37
- package/src/metrics/_incrementGauge.js +0 -11
- package/src/metrics/_processStartMs.js +0 -1
- package/src/metrics/activeNodes.js +0 -2
- package/src/metrics/activeRuns.js +0 -2
- package/src/metrics/agentActionsTotal.js +0 -2
- package/src/metrics/agentDurationMs.js +0 -3
- package/src/metrics/agentErrorsTotal.js +0 -2
- package/src/metrics/agentEventsTotal.js +0 -2
- package/src/metrics/agentInvocationsTotal.js +0 -2
- package/src/metrics/agentRetriesTotal.js +0 -2
- package/src/metrics/agentSessionsTotal.js +0 -2
- package/src/metrics/agentTokensTotal.js +0 -2
- package/src/metrics/alertDeliveriesAttempted.js +0 -2
- package/src/metrics/alertDeliveriesSuppressed.js +0 -2
- package/src/metrics/alertsAcknowledgedTotal.js +0 -2
- package/src/metrics/alertsActive.js +0 -2
- package/src/metrics/alertsEscalatedTotal.js +0 -2
- package/src/metrics/alertsFiredTotal.js +0 -2
- package/src/metrics/alertsReopenedTotal.js +0 -2
- package/src/metrics/alertsResolvedTotal.js +0 -2
- package/src/metrics/alertsSilencedTotal.js +0 -2
- package/src/metrics/approvalPending.js +0 -2
- package/src/metrics/approvalWaitDuration.js +0 -5
- package/src/metrics/approvalsDenied.js +0 -2
- package/src/metrics/approvalsGranted.js +0 -2
- package/src/metrics/approvalsRequested.js +0 -2
- package/src/metrics/attemptDuration.js +0 -3
- package/src/metrics/attentionBacklog.js +0 -2
- package/src/metrics/cacheHits.js +0 -2
- package/src/metrics/cacheMisses.js +0 -2
- package/src/metrics/dbQueryDuration.js +0 -3
- package/src/metrics/dbRetries.js +0 -2
- package/src/metrics/dbTransactionDuration.js +0 -3
- package/src/metrics/dbTransactionRetries.js +0 -2
- package/src/metrics/dbTransactionRollbacks.js +0 -2
- package/src/metrics/devtoolsActiveSubscribers.js +0 -2
- package/src/metrics/devtoolsBackpressureDisconnectTotal.js +0 -2
- package/src/metrics/devtoolsDeltaBuildMs.js +0 -3
- package/src/metrics/devtoolsEventBytes.js +0 -3
- package/src/metrics/devtoolsEventTotal.js +0 -2
- package/src/metrics/devtoolsSnapshotBuildMs.js +0 -5
- package/src/metrics/devtoolsSubscribeTotal.js +0 -2
- package/src/metrics/errorsTotal.js +0 -2
- package/src/metrics/eventsEmittedTotal.js +0 -2
- package/src/metrics/externalWaitAsyncPending.js +0 -2
- package/src/metrics/gatewayApprovalDecisionsTotal.js +0 -2
- package/src/metrics/gatewayAuthEventsTotal.js +0 -2
- package/src/metrics/gatewayConnectionsActive.js +0 -2
- package/src/metrics/gatewayConnectionsClosedTotal.js +0 -2
- package/src/metrics/gatewayConnectionsTotal.js +0 -2
- package/src/metrics/gatewayCronTriggersTotal.js +0 -2
- package/src/metrics/gatewayErrorsTotal.js +0 -2
- package/src/metrics/gatewayHeartbeatTicksTotal.js +0 -2
- package/src/metrics/gatewayMessagesReceivedTotal.js +0 -2
- package/src/metrics/gatewayMessagesSentTotal.js +0 -2
- package/src/metrics/gatewayRpcCallsTotal.js +0 -2
- package/src/metrics/gatewayRpcDuration.js +0 -3
- package/src/metrics/gatewayRunEventBackpressureDisconnectTotal.js +0 -4
- package/src/metrics/gatewayRunsCompletedTotal.js +0 -2
- package/src/metrics/gatewayRunsStartedTotal.js +0 -2
- package/src/metrics/gatewaySignalsTotal.js +0 -2
- package/src/metrics/gatewayWebhooksReceivedTotal.js +0 -2
- package/src/metrics/gatewayWebhooksRejectedTotal.js +0 -2
- package/src/metrics/gatewayWebhooksVerifiedTotal.js +0 -2
- package/src/metrics/heartbeatDataSizeBytes.js +0 -5
- package/src/metrics/heartbeatIntervalMs.js +0 -3
- package/src/metrics/hotReloadDuration.js +0 -3
- package/src/metrics/hotReloadFailures.js +0 -2
- package/src/metrics/hotReloads.js +0 -2
- package/src/metrics/httpRequestDuration.js +0 -3
- package/src/metrics/httpRequests.js +0 -2
- package/src/metrics/index.d.ts +0 -1185
- package/src/metrics/index.js +0 -168
- package/src/metrics/memoryFactReads.js +0 -3
- package/src/metrics/memoryFactWrites.js +0 -3
- package/src/metrics/memoryMessageSaves.js +0 -3
- package/src/metrics/memoryRecallDuration.js +0 -11
- package/src/metrics/memoryRecallQueries.js +0 -3
- package/src/metrics/metricsServiceAdapter.js +0 -181
- package/src/metrics/nodeDuration.js +0 -3
- package/src/metrics/nodeRetriesTotal.js +0 -2
- package/src/metrics/nodesFailed.js +0 -2
- package/src/metrics/nodesFinished.js +0 -2
- package/src/metrics/nodesStarted.js +0 -2
- package/src/metrics/openApiToolCallErrorsTotal.js +0 -3
- package/src/metrics/openApiToolCallsTotal.js +0 -3
- package/src/metrics/openApiToolDuration.js +0 -9
- package/src/metrics/processHeapUsedBytes.js +0 -2
- package/src/metrics/processMemoryRssBytes.js +0 -2
- package/src/metrics/processUptimeSeconds.js +0 -2
- package/src/metrics/promptSizeBytes.js +0 -3
- package/src/metrics/replaysStarted.js +0 -3
- package/src/metrics/responseSizeBytes.js +0 -3
- package/src/metrics/rewindDurationMs.js +0 -3
- package/src/metrics/rewindFramesDeleted.js +0 -3
- package/src/metrics/rewindRollbackTotal.js +0 -2
- package/src/metrics/rewindSandboxesReverted.js +0 -3
- package/src/metrics/rewindTotal.js +0 -2
- package/src/metrics/runDuration.js +0 -3
- package/src/metrics/runForksCreated.js +0 -3
- package/src/metrics/runsAncestryDepth.js +0 -3
- package/src/metrics/runsCancelledTotal.js +0 -2
- package/src/metrics/runsCarriedStateBytes.js +0 -5
- package/src/metrics/runsContinuedTotal.js +0 -2
- package/src/metrics/runsFailedTotal.js +0 -2
- package/src/metrics/runsFinishedTotal.js +0 -2
- package/src/metrics/runsResumedTotal.js +0 -2
- package/src/metrics/runsTotal.js +0 -2
- package/src/metrics/sandboxActive.js +0 -2
- package/src/metrics/sandboxBundleSizeBytes.js +0 -5
- package/src/metrics/sandboxCompletedTotal.js +0 -2
- package/src/metrics/sandboxCreatedTotal.js +0 -2
- package/src/metrics/sandboxDurationMs.js +0 -3
- package/src/metrics/sandboxPatchCount.js +0 -3
- package/src/metrics/sandboxTransportDurationMs.js +0 -5
- package/src/metrics/schedulerConcurrencyUtilization.js +0 -2
- package/src/metrics/schedulerQueueDepth.js +0 -2
- package/src/metrics/schedulerWaitDuration.js +0 -5
- package/src/metrics/scorerDuration.js +0 -9
- package/src/metrics/scorerEventsFailed.js +0 -2
- package/src/metrics/scorerEventsFinished.js +0 -2
- package/src/metrics/scorerEventsStarted.js +0 -2
- package/src/metrics/scorersFailed.js +0 -3
- package/src/metrics/scorersFinished.js +0 -3
- package/src/metrics/scorersStarted.js +0 -3
- package/src/metrics/smithersMetricCatalog.js +0 -893
- package/src/metrics/smithersMetricCatalogByKey.js +0 -2
- package/src/metrics/smithersMetricCatalogByName.js +0 -2
- package/src/metrics/smithersMetricCatalogByPrometheusName.js +0 -4
- package/src/metrics/snapshotDuration.js +0 -9
- package/src/metrics/snapshotsCaptured.js +0 -3
- package/src/metrics/supervisorPollDuration.js +0 -5
- package/src/metrics/supervisorPollsTotal.js +0 -2
- package/src/metrics/supervisorResumeLag.js +0 -5
- package/src/metrics/supervisorResumedTotal.js +0 -2
- package/src/metrics/supervisorSkippedTotal.js +0 -2
- package/src/metrics/supervisorStaleDetected.js +0 -2
- package/src/metrics/taskHeartbeatTimeoutTotal.js +0 -2
- package/src/metrics/taskHeartbeatsTotal.js +0 -2
- package/src/metrics/timerDelayDuration.js +0 -3
- package/src/metrics/timersCancelled.js +0 -2
- package/src/metrics/timersCreated.js +0 -2
- package/src/metrics/timersFired.js +0 -2
- package/src/metrics/timersPending.js +0 -2
- package/src/metrics/toPrometheusMetricName.js +0 -8
- package/src/metrics/tokensCacheReadTotal.js +0 -2
- package/src/metrics/tokensCacheWriteTotal.js +0 -2
- package/src/metrics/tokensContextWindowBucketTotal.js +0 -2
- package/src/metrics/tokensContextWindowPerCall.js +0 -5
- package/src/metrics/tokensInputPerCall.js +0 -3
- package/src/metrics/tokensInputTotal.js +0 -2
- package/src/metrics/tokensOutputPerCall.js +0 -3
- package/src/metrics/tokensOutputTotal.js +0 -2
- package/src/metrics/tokensReasoningTotal.js +0 -2
- package/src/metrics/toolCallErrorsTotal.js +0 -2
- package/src/metrics/toolCallsTotal.js +0 -2
- package/src/metrics/toolDuration.js +0 -3
- package/src/metrics/toolOutputTruncatedTotal.js +0 -2
- package/src/metrics/trackEvent.js +0 -608
- package/src/metrics/updateAsyncExternalWaitPending.js +0 -18
- package/src/metrics/updateProcessMetrics.js +0 -20
- package/src/metrics/vcsDuration.js +0 -3
- package/src/normalizeStructuredEvent.js +0 -15
- package/src/prometheusContentType.js +0 -1
- package/src/renderPrometheusMetrics.js +0 -212
- package/src/resolveAgentTraceCapabilities.js +0 -59
- package/src/resolveSmithersObservabilityOptions.js +0 -109
- package/src/smithersMetrics.js +0 -2
- package/src/smithersSpanNames.js +0 -6
- package/src/unsupportedKindsForCapabilities.js +0 -32
- package/src/withSmithersSpan.js +0 -17
- package/tempo/tempo.yml +0 -17
package/src/metrics/index.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/** @typedef {import("../SmithersMetricDefinition.ts").SmithersMetricDefinition} SmithersMetricDefinition */
|
|
2
|
-
/** @typedef {import("../SmithersMetricType.ts").SmithersMetricType} SmithersMetricType */
|
|
3
|
-
/** @typedef {import("../SmithersMetricUnit.ts").SmithersMetricUnit} SmithersMetricUnit */
|
|
4
|
-
|
|
5
|
-
// Functions
|
|
6
|
-
export { toPrometheusMetricName } from "./toPrometheusMetricName.js";
|
|
7
|
-
export { updateProcessMetrics } from "./updateProcessMetrics.js";
|
|
8
|
-
export { updateAsyncExternalWaitPending } from "./updateAsyncExternalWaitPending.js";
|
|
9
|
-
export { trackEvent } from "./trackEvent.js";
|
|
10
|
-
// Catalog
|
|
11
|
-
export { smithersMetricCatalog } from "./smithersMetricCatalog.js";
|
|
12
|
-
export { smithersMetricCatalogByKey } from "./smithersMetricCatalogByKey.js";
|
|
13
|
-
export { smithersMetricCatalogByName } from "./smithersMetricCatalogByName.js";
|
|
14
|
-
export { smithersMetricCatalogByPrometheusName } from "./smithersMetricCatalogByPrometheusName.js";
|
|
15
|
-
// Service adapter
|
|
16
|
-
export { metricsServiceAdapter } from "./metricsServiceAdapter.js";
|
|
17
|
-
// Counters
|
|
18
|
-
export { runsTotal } from "./runsTotal.js";
|
|
19
|
-
export { nodesStarted } from "./nodesStarted.js";
|
|
20
|
-
export { nodesFinished } from "./nodesFinished.js";
|
|
21
|
-
export { nodesFailed } from "./nodesFailed.js";
|
|
22
|
-
export { toolCallsTotal } from "./toolCallsTotal.js";
|
|
23
|
-
export { cacheHits } from "./cacheHits.js";
|
|
24
|
-
export { cacheMisses } from "./cacheMisses.js";
|
|
25
|
-
export { dbRetries } from "./dbRetries.js";
|
|
26
|
-
export { dbTransactionRollbacks } from "./dbTransactionRollbacks.js";
|
|
27
|
-
export { dbTransactionRetries } from "./dbTransactionRetries.js";
|
|
28
|
-
export { hotReloads } from "./hotReloads.js";
|
|
29
|
-
export { hotReloadFailures } from "./hotReloadFailures.js";
|
|
30
|
-
export { httpRequests } from "./httpRequests.js";
|
|
31
|
-
export { approvalsRequested } from "./approvalsRequested.js";
|
|
32
|
-
export { approvalsGranted } from "./approvalsGranted.js";
|
|
33
|
-
export { approvalsDenied } from "./approvalsDenied.js";
|
|
34
|
-
export { timersCreated } from "./timersCreated.js";
|
|
35
|
-
export { timersFired } from "./timersFired.js";
|
|
36
|
-
export { timersCancelled } from "./timersCancelled.js";
|
|
37
|
-
export { sandboxCreatedTotal } from "./sandboxCreatedTotal.js";
|
|
38
|
-
export { sandboxCompletedTotal } from "./sandboxCompletedTotal.js";
|
|
39
|
-
export { alertsFiredTotal } from "./alertsFiredTotal.js";
|
|
40
|
-
export { alertsAcknowledgedTotal } from "./alertsAcknowledgedTotal.js";
|
|
41
|
-
export { alertsResolvedTotal } from "./alertsResolvedTotal.js";
|
|
42
|
-
export { alertsSilencedTotal } from "./alertsSilencedTotal.js";
|
|
43
|
-
export { alertsReopenedTotal } from "./alertsReopenedTotal.js";
|
|
44
|
-
export { alertsEscalatedTotal } from "./alertsEscalatedTotal.js";
|
|
45
|
-
export { alertDeliveriesAttempted } from "./alertDeliveriesAttempted.js";
|
|
46
|
-
export { alertDeliveriesSuppressed } from "./alertDeliveriesSuppressed.js";
|
|
47
|
-
export { scorerEventsStarted } from "./scorerEventsStarted.js";
|
|
48
|
-
export { scorerEventsFinished } from "./scorerEventsFinished.js";
|
|
49
|
-
export { scorerEventsFailed } from "./scorerEventsFailed.js";
|
|
50
|
-
export { tokensInputTotal } from "./tokensInputTotal.js";
|
|
51
|
-
export { tokensOutputTotal } from "./tokensOutputTotal.js";
|
|
52
|
-
export { tokensCacheReadTotal } from "./tokensCacheReadTotal.js";
|
|
53
|
-
export { tokensCacheWriteTotal } from "./tokensCacheWriteTotal.js";
|
|
54
|
-
export { tokensReasoningTotal } from "./tokensReasoningTotal.js";
|
|
55
|
-
export { tokensContextWindowBucketTotal } from "./tokensContextWindowBucketTotal.js";
|
|
56
|
-
export { runsFinishedTotal } from "./runsFinishedTotal.js";
|
|
57
|
-
export { runsFailedTotal } from "./runsFailedTotal.js";
|
|
58
|
-
export { runsCancelledTotal } from "./runsCancelledTotal.js";
|
|
59
|
-
export { runsResumedTotal } from "./runsResumedTotal.js";
|
|
60
|
-
export { runsContinuedTotal } from "./runsContinuedTotal.js";
|
|
61
|
-
export { supervisorPollsTotal } from "./supervisorPollsTotal.js";
|
|
62
|
-
export { supervisorStaleDetected } from "./supervisorStaleDetected.js";
|
|
63
|
-
export { supervisorResumedTotal } from "./supervisorResumedTotal.js";
|
|
64
|
-
export { supervisorSkippedTotal } from "./supervisorSkippedTotal.js";
|
|
65
|
-
export { errorsTotal } from "./errorsTotal.js";
|
|
66
|
-
export { nodeRetriesTotal } from "./nodeRetriesTotal.js";
|
|
67
|
-
export { toolCallErrorsTotal } from "./toolCallErrorsTotal.js";
|
|
68
|
-
export { toolOutputTruncatedTotal } from "./toolOutputTruncatedTotal.js";
|
|
69
|
-
export { agentInvocationsTotal } from "./agentInvocationsTotal.js";
|
|
70
|
-
export { agentTokensTotal } from "./agentTokensTotal.js";
|
|
71
|
-
export { agentErrorsTotal } from "./agentErrorsTotal.js";
|
|
72
|
-
export { agentRetriesTotal } from "./agentRetriesTotal.js";
|
|
73
|
-
export { agentEventsTotal } from "./agentEventsTotal.js";
|
|
74
|
-
export { agentSessionsTotal } from "./agentSessionsTotal.js";
|
|
75
|
-
export { agentActionsTotal } from "./agentActionsTotal.js";
|
|
76
|
-
export { gatewayConnectionsTotal } from "./gatewayConnectionsTotal.js";
|
|
77
|
-
export { gatewayConnectionsClosedTotal } from "./gatewayConnectionsClosedTotal.js";
|
|
78
|
-
export { gatewayMessagesReceivedTotal } from "./gatewayMessagesReceivedTotal.js";
|
|
79
|
-
export { gatewayMessagesSentTotal } from "./gatewayMessagesSentTotal.js";
|
|
80
|
-
export { gatewayRpcCallsTotal } from "./gatewayRpcCallsTotal.js";
|
|
81
|
-
export { gatewayErrorsTotal } from "./gatewayErrorsTotal.js";
|
|
82
|
-
export { gatewayRunsStartedTotal } from "./gatewayRunsStartedTotal.js";
|
|
83
|
-
export { gatewayRunsCompletedTotal } from "./gatewayRunsCompletedTotal.js";
|
|
84
|
-
export { gatewayApprovalDecisionsTotal } from "./gatewayApprovalDecisionsTotal.js";
|
|
85
|
-
export { gatewaySignalsTotal } from "./gatewaySignalsTotal.js";
|
|
86
|
-
export { gatewayAuthEventsTotal } from "./gatewayAuthEventsTotal.js";
|
|
87
|
-
export { gatewayHeartbeatTicksTotal } from "./gatewayHeartbeatTicksTotal.js";
|
|
88
|
-
export { gatewayCronTriggersTotal } from "./gatewayCronTriggersTotal.js";
|
|
89
|
-
export { gatewayWebhooksReceivedTotal } from "./gatewayWebhooksReceivedTotal.js";
|
|
90
|
-
export { gatewayWebhooksVerifiedTotal } from "./gatewayWebhooksVerifiedTotal.js";
|
|
91
|
-
export { gatewayWebhooksRejectedTotal } from "./gatewayWebhooksRejectedTotal.js";
|
|
92
|
-
export { devtoolsSubscribeTotal } from "./devtoolsSubscribeTotal.js";
|
|
93
|
-
export { devtoolsEventTotal } from "./devtoolsEventTotal.js";
|
|
94
|
-
export { devtoolsBackpressureDisconnectTotal } from "./devtoolsBackpressureDisconnectTotal.js";
|
|
95
|
-
export { gatewayRunEventBackpressureDisconnectTotal } from "./gatewayRunEventBackpressureDisconnectTotal.js";
|
|
96
|
-
export { eventsEmittedTotal } from "./eventsEmittedTotal.js";
|
|
97
|
-
export { taskHeartbeatsTotal } from "./taskHeartbeatsTotal.js";
|
|
98
|
-
export { taskHeartbeatTimeoutTotal } from "./taskHeartbeatTimeoutTotal.js";
|
|
99
|
-
export { memoryFactReads } from "./memoryFactReads.js";
|
|
100
|
-
export { memoryFactWrites } from "./memoryFactWrites.js";
|
|
101
|
-
export { memoryRecallQueries } from "./memoryRecallQueries.js";
|
|
102
|
-
export { memoryMessageSaves } from "./memoryMessageSaves.js";
|
|
103
|
-
export { openApiToolCallsTotal } from "./openApiToolCallsTotal.js";
|
|
104
|
-
export { openApiToolCallErrorsTotal } from "./openApiToolCallErrorsTotal.js";
|
|
105
|
-
export { scorersStarted } from "./scorersStarted.js";
|
|
106
|
-
export { scorersFinished } from "./scorersFinished.js";
|
|
107
|
-
export { scorersFailed } from "./scorersFailed.js";
|
|
108
|
-
export { snapshotsCaptured } from "./snapshotsCaptured.js";
|
|
109
|
-
export { runForksCreated } from "./runForksCreated.js";
|
|
110
|
-
export { replaysStarted } from "./replaysStarted.js";
|
|
111
|
-
// Gauges
|
|
112
|
-
export { activeRuns } from "./activeRuns.js";
|
|
113
|
-
export { activeNodes } from "./activeNodes.js";
|
|
114
|
-
export { schedulerQueueDepth } from "./schedulerQueueDepth.js";
|
|
115
|
-
export { sandboxActive } from "./sandboxActive.js";
|
|
116
|
-
export { alertsActive } from "./alertsActive.js";
|
|
117
|
-
export { attentionBacklog } from "./attentionBacklog.js";
|
|
118
|
-
export { gatewayConnectionsActive } from "./gatewayConnectionsActive.js";
|
|
119
|
-
export { approvalPending } from "./approvalPending.js";
|
|
120
|
-
export { externalWaitAsyncPending } from "./externalWaitAsyncPending.js";
|
|
121
|
-
export { timersPending } from "./timersPending.js";
|
|
122
|
-
export { schedulerConcurrencyUtilization } from "./schedulerConcurrencyUtilization.js";
|
|
123
|
-
export { processUptimeSeconds } from "./processUptimeSeconds.js";
|
|
124
|
-
export { processMemoryRssBytes } from "./processMemoryRssBytes.js";
|
|
125
|
-
export { processHeapUsedBytes } from "./processHeapUsedBytes.js";
|
|
126
|
-
export { devtoolsActiveSubscribers } from "./devtoolsActiveSubscribers.js";
|
|
127
|
-
// Histograms
|
|
128
|
-
export { nodeDuration } from "./nodeDuration.js";
|
|
129
|
-
export { attemptDuration } from "./attemptDuration.js";
|
|
130
|
-
export { toolDuration } from "./toolDuration.js";
|
|
131
|
-
export { dbQueryDuration } from "./dbQueryDuration.js";
|
|
132
|
-
export { dbTransactionDuration } from "./dbTransactionDuration.js";
|
|
133
|
-
export { httpRequestDuration } from "./httpRequestDuration.js";
|
|
134
|
-
export { hotReloadDuration } from "./hotReloadDuration.js";
|
|
135
|
-
export { vcsDuration } from "./vcsDuration.js";
|
|
136
|
-
export { agentDurationMs } from "./agentDurationMs.js";
|
|
137
|
-
export { tokensInputPerCall } from "./tokensInputPerCall.js";
|
|
138
|
-
export { tokensOutputPerCall } from "./tokensOutputPerCall.js";
|
|
139
|
-
export { tokensContextWindowPerCall } from "./tokensContextWindowPerCall.js";
|
|
140
|
-
export { runDuration } from "./runDuration.js";
|
|
141
|
-
export { promptSizeBytes } from "./promptSizeBytes.js";
|
|
142
|
-
export { responseSizeBytes } from "./responseSizeBytes.js";
|
|
143
|
-
export { approvalWaitDuration } from "./approvalWaitDuration.js";
|
|
144
|
-
export { timerDelayDuration } from "./timerDelayDuration.js";
|
|
145
|
-
export { gatewayRpcDuration } from "./gatewayRpcDuration.js";
|
|
146
|
-
export { schedulerWaitDuration } from "./schedulerWaitDuration.js";
|
|
147
|
-
export { supervisorPollDuration } from "./supervisorPollDuration.js";
|
|
148
|
-
export { supervisorResumeLag } from "./supervisorResumeLag.js";
|
|
149
|
-
export { runsAncestryDepth } from "./runsAncestryDepth.js";
|
|
150
|
-
export { runsCarriedStateBytes } from "./runsCarriedStateBytes.js";
|
|
151
|
-
export { sandboxDurationMs } from "./sandboxDurationMs.js";
|
|
152
|
-
export { sandboxBundleSizeBytes } from "./sandboxBundleSizeBytes.js";
|
|
153
|
-
export { sandboxTransportDurationMs } from "./sandboxTransportDurationMs.js";
|
|
154
|
-
export { sandboxPatchCount } from "./sandboxPatchCount.js";
|
|
155
|
-
export { heartbeatDataSizeBytes } from "./heartbeatDataSizeBytes.js";
|
|
156
|
-
export { heartbeatIntervalMs } from "./heartbeatIntervalMs.js";
|
|
157
|
-
export { memoryRecallDuration } from "./memoryRecallDuration.js";
|
|
158
|
-
export { openApiToolDuration } from "./openApiToolDuration.js";
|
|
159
|
-
export { scorerDuration } from "./scorerDuration.js";
|
|
160
|
-
export { snapshotDuration } from "./snapshotDuration.js";
|
|
161
|
-
export { devtoolsSnapshotBuildMs } from "./devtoolsSnapshotBuildMs.js";
|
|
162
|
-
export { devtoolsDeltaBuildMs } from "./devtoolsDeltaBuildMs.js";
|
|
163
|
-
export { devtoolsEventBytes } from "./devtoolsEventBytes.js";
|
|
164
|
-
export { rewindTotal } from "./rewindTotal.js";
|
|
165
|
-
export { rewindRollbackTotal } from "./rewindRollbackTotal.js";
|
|
166
|
-
export { rewindDurationMs } from "./rewindDurationMs.js";
|
|
167
|
-
export { rewindFramesDeleted } from "./rewindFramesDeleted.js";
|
|
168
|
-
export { rewindSandboxesReverted } from "./rewindSandboxesReverted.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Metric } from "effect";
|
|
2
|
-
|
|
3
|
-
const durationBuckets = Metric.exponentialBoundaries({
|
|
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", {
|
|
10
|
-
boundaries: durationBuckets,
|
|
11
|
-
});
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { renderPrometheusSamples } from "../_corePrometheus.js";
|
|
2
|
-
import { Effect, Metric } from "effect";
|
|
3
|
-
import { toPrometheusMetricName } from "./toPrometheusMetricName.js";
|
|
4
|
-
import { durationBuckets } from "./_buckets.js";
|
|
5
|
-
import { smithersMetricCatalogByName } from "./smithersMetricCatalogByName.js";
|
|
6
|
-
import { smithersMetricCatalogByPrometheusName } from "./smithersMetricCatalogByPrometheusName.js";
|
|
7
|
-
import { trackEvent } from "./trackEvent.js";
|
|
8
|
-
import { updateProcessMetrics } from "./updateProcessMetrics.js";
|
|
9
|
-
import { updateAsyncExternalWaitPending } from "./updateAsyncExternalWaitPending.js";
|
|
10
|
-
import { incrementGauge } from "./_incrementGauge.js";
|
|
11
|
-
/** @typedef {import("./SmithersMetricDefinition.ts").SmithersMetricDefinition} SmithersMetricDefinition */
|
|
12
|
-
/** @typedef {import("../_coreMetricsShape.ts").MetricsServiceShape} MetricsServiceShape */
|
|
13
|
-
/** @typedef {import("../_corePrometheusShape.ts").MetricLabels} MetricLabels */
|
|
14
|
-
/** @typedef {import("../_corePrometheusShape.ts").PrometheusSample} PrometheusSample */
|
|
15
|
-
/** @typedef {import("../_coreMetricsShape.ts").MetricsSnapshot} MetricsSnapshot */
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @param {string} name
|
|
19
|
-
* @returns {SmithersMetricDefinition | undefined}
|
|
20
|
-
*/
|
|
21
|
-
function resolveMetricDefinition(name) {
|
|
22
|
-
return (
|
|
23
|
-
smithersMetricCatalogByName.get(name) ?? smithersMetricCatalogByPrometheusName.get(toPrometheusMetricName(name))
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @template A
|
|
28
|
-
* @param {A} metric
|
|
29
|
-
* @param {MetricLabels} [labels]
|
|
30
|
-
* @returns {A}
|
|
31
|
-
*/
|
|
32
|
-
function tagMetricWithLabels(metric, labels) {
|
|
33
|
-
let tagged = metric;
|
|
34
|
-
for (const [key, value] of Object.entries(labels ?? {})) {
|
|
35
|
-
tagged = Metric.withAttributes(tagged, { [key]: String(value) });
|
|
36
|
-
}
|
|
37
|
-
return tagged;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @param {string} name
|
|
41
|
-
* @param {MetricLabels} [labels]
|
|
42
|
-
* @returns {Metric.Metric<any, number, any>}
|
|
43
|
-
*/
|
|
44
|
-
function counterOrGaugeMetric(name, labels) {
|
|
45
|
-
const definition = resolveMetricDefinition(name);
|
|
46
|
-
const metric =
|
|
47
|
-
definition?.type === "counter" || definition?.type === "gauge" ? definition.metric : Metric.counter(name);
|
|
48
|
-
return tagMetricWithLabels(metric, labels);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @param {string} name
|
|
52
|
-
* @param {MetricLabels} [labels]
|
|
53
|
-
* @returns {Metric.Metric<any, number, any>}
|
|
54
|
-
*/
|
|
55
|
-
function gaugeMetric(name, labels) {
|
|
56
|
-
const definition = resolveMetricDefinition(name);
|
|
57
|
-
const metric = definition?.type === "gauge" ? definition.metric : Metric.gauge(name);
|
|
58
|
-
return tagMetricWithLabels(metric, labels);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* @param {string} name
|
|
62
|
-
* @param {MetricLabels} [labels]
|
|
63
|
-
* @returns {Metric.Metric<any, number, any>}
|
|
64
|
-
*/
|
|
65
|
-
function histogramMetric(name, labels) {
|
|
66
|
-
const definition = resolveMetricDefinition(name);
|
|
67
|
-
const metric =
|
|
68
|
-
definition?.type === "histogram" ? definition.metric : Metric.histogram(name, { boundaries: durationBuckets });
|
|
69
|
-
return tagMetricWithLabels(metric, labels);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @param {number | bigint | undefined} value
|
|
73
|
-
* @returns {number}
|
|
74
|
-
*/
|
|
75
|
-
function metricValueAsNumber(value) {
|
|
76
|
-
if (typeof value === "bigint") return Number(value);
|
|
77
|
-
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @param {Record<string, string> | undefined} attributes
|
|
81
|
-
* @returns {MetricLabels}
|
|
82
|
-
*/
|
|
83
|
-
function metricsServiceLabels(attributes) {
|
|
84
|
-
return Object.freeze(
|
|
85
|
-
Object.fromEntries(Object.entries(attributes ?? {}).sort(([left], [right]) => left.localeCompare(right))),
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @param {string} name
|
|
90
|
-
* @param {MetricLabels} labels
|
|
91
|
-
* @returns {string}
|
|
92
|
-
*/
|
|
93
|
-
function metricsServiceSnapshotKey(name, labels) {
|
|
94
|
-
return `${name}|${JSON.stringify(Object.entries(labels).sort(([left], [right]) => left.localeCompare(right)))}`;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* @returns {PrometheusSample[]}
|
|
98
|
-
*/
|
|
99
|
-
function metricsServicePrometheusSamples() {
|
|
100
|
-
const samples = [];
|
|
101
|
-
for (const snapshot of Effect.runSync(Metric.snapshot)) {
|
|
102
|
-
const metricState = snapshot.state;
|
|
103
|
-
const name = snapshot.id;
|
|
104
|
-
if (!name) continue;
|
|
105
|
-
const labels = metricsServiceLabels(snapshot.attributes);
|
|
106
|
-
if (snapshot.type === "Counter") {
|
|
107
|
-
samples.push({
|
|
108
|
-
name,
|
|
109
|
-
type: "counter",
|
|
110
|
-
labels,
|
|
111
|
-
value: metricValueAsNumber(metricState.count),
|
|
112
|
-
});
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
if (snapshot.type === "Gauge") {
|
|
116
|
-
samples.push({
|
|
117
|
-
name,
|
|
118
|
-
type: "gauge",
|
|
119
|
-
labels,
|
|
120
|
-
value: metricValueAsNumber(metricState.value),
|
|
121
|
-
});
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (snapshot.type === "Histogram") {
|
|
125
|
-
samples.push({
|
|
126
|
-
name,
|
|
127
|
-
type: "histogram",
|
|
128
|
-
labels,
|
|
129
|
-
buckets: new Map([...metricState.buckets].map(([boundary, count]) => [boundary, metricValueAsNumber(count)])),
|
|
130
|
-
sum: metricValueAsNumber(metricState.sum),
|
|
131
|
-
count: metricValueAsNumber(metricState.count),
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return samples;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* @returns {MetricsSnapshot}
|
|
139
|
-
*/
|
|
140
|
-
function metricsServiceSnapshot() {
|
|
141
|
-
const result = new Map();
|
|
142
|
-
for (const sample of metricsServicePrometheusSamples()) {
|
|
143
|
-
const key = metricsServiceSnapshotKey(sample.name, sample.labels);
|
|
144
|
-
if (sample.type === "histogram") {
|
|
145
|
-
result.set(key, {
|
|
146
|
-
type: "histogram",
|
|
147
|
-
sum: sample.sum ?? 0,
|
|
148
|
-
count: sample.count ?? 0,
|
|
149
|
-
labels: sample.labels,
|
|
150
|
-
buckets: new Map(sample.buckets ?? []),
|
|
151
|
-
});
|
|
152
|
-
continue;
|
|
153
|
-
}
|
|
154
|
-
result.set(key, {
|
|
155
|
-
type: sample.type,
|
|
156
|
-
value: sample.value ?? 0,
|
|
157
|
-
labels: sample.labels,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
return result;
|
|
161
|
-
}
|
|
162
|
-
/** @type {MetricsServiceShape} */
|
|
163
|
-
export const metricsServiceAdapter = {
|
|
164
|
-
increment: (name, labels) => {
|
|
165
|
-
const metric = counterOrGaugeMetric(name, labels);
|
|
166
|
-
return resolveMetricDefinition(name)?.type === "gauge" ? incrementGauge(metric, 1) : Metric.update(metric, 1);
|
|
167
|
-
},
|
|
168
|
-
incrementBy: (name, value, labels) => {
|
|
169
|
-
const metric = counterOrGaugeMetric(name, labels);
|
|
170
|
-
return resolveMetricDefinition(name)?.type === "gauge"
|
|
171
|
-
? incrementGauge(metric, value)
|
|
172
|
-
: Metric.update(metric, value);
|
|
173
|
-
},
|
|
174
|
-
gauge: (name, value, labels) => Metric.update(gaugeMetric(name, labels), value),
|
|
175
|
-
histogram: (name, value, labels) => Metric.update(histogramMetric(name, labels), value),
|
|
176
|
-
recordEvent: (event) => trackEvent(event),
|
|
177
|
-
updateProcessMetrics: () => updateProcessMetrics(),
|
|
178
|
-
updateAsyncExternalWaitPending: (kind, delta) => updateAsyncExternalWaitPending(kind, delta),
|
|
179
|
-
renderPrometheus: () => Effect.sync(() => renderPrometheusSamples(metricsServicePrometheusSamples())),
|
|
180
|
-
snapshot: () => Effect.sync(metricsServiceSnapshot),
|
|
181
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Metric } from "effect";
|
|
2
|
-
|
|
3
|
-
const toolBuckets = Metric.exponentialBoundaries({
|
|
4
|
-
start: 10,
|
|
5
|
-
factor: 2,
|
|
6
|
-
count: 14,
|
|
7
|
-
}); // ~10ms to ~80s
|
|
8
|
-
|
|
9
|
-
export const openApiToolDuration = Metric.histogram("smithers.openapi.tool_duration_ms", { boundaries: toolBuckets });
|
package/src/metrics/runsTotal.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Metric } from "effect";
|
|
2
|
-
|
|
3
|
-
const scorerBuckets = Metric.exponentialBoundaries({
|
|
4
|
-
start: 10,
|
|
5
|
-
factor: 2,
|
|
6
|
-
count: 14,
|
|
7
|
-
}); // ~10ms to ~80s
|
|
8
|
-
|
|
9
|
-
export const scorerDuration = Metric.histogram("smithers.scorer.duration_ms", { boundaries: scorerBuckets });
|