/** * Metric catalogue for Weft observability. * * @module metrics-catalog */ /** * Metric names and descriptions for Weft observability. * * @example * ```ts * import { METRICS } from '@lostgradient/weft/observability'; * * for (const metric of Object.values(METRICS)) { * console.log(metric.name, metric.type, metric.unit); * } * // e.g. 'weft.workflow.duration' 'histogram' 'ms' * ``` */ export declare const METRICS: { readonly workflowDuration: { readonly name: "weft.workflow.duration"; readonly description: "Duration of workflow execution in milliseconds"; readonly unit: "ms"; readonly type: "histogram"; }; readonly activityDuration: { readonly name: "weft.activity.duration"; readonly description: "Duration of activity execution in milliseconds"; readonly unit: "ms"; readonly type: "histogram"; }; readonly activityAttempts: { readonly name: "weft.activity.attempts"; readonly description: "Total activity execution attempts"; readonly unit: "attempts"; readonly type: "counter"; }; readonly workflowActive: { readonly name: "weft.workflow.active"; readonly description: "Number of currently active workflows"; readonly unit: "workflows"; readonly type: "gauge"; }; readonly workflowStarted: { readonly name: "weft.workflow.started"; readonly description: "Total workflows started"; readonly unit: "workflows"; readonly type: "counter"; }; readonly workflowCompleted: { readonly name: "weft.workflow.completed"; readonly description: "Total workflows completed"; readonly unit: "workflows"; readonly type: "counter"; }; readonly workflowFailed: { readonly name: "weft.workflow.failed"; readonly description: "Total workflows failed"; readonly unit: "workflows"; readonly type: "counter"; }; readonly promptCacheHits: { readonly name: "weft.prompt_cache.hits"; readonly description: "Total prompt prefix cache hits"; readonly unit: "hits"; readonly type: "counter"; }; readonly promptCacheMisses: { readonly name: "weft.prompt_cache.misses"; readonly description: "Total prompt prefix cache misses"; readonly unit: "misses"; readonly type: "counter"; }; readonly dpmoDefects: { readonly name: "weft.dpmo.defects"; readonly description: "Total failed workflows (DPMO numerator)"; readonly unit: "workflows"; readonly type: "counter"; }; readonly dpmoOperations: { readonly name: "weft.dpmo.operations"; readonly description: "Total started workflows (DPMO denominator)"; readonly unit: "workflows"; readonly type: "counter"; }; readonly taskBacklog: { readonly name: "weft.task.backlog"; readonly description: "Number of queued tasks waiting for workers"; readonly unit: "tasks"; readonly type: "gauge"; }; readonly taskQueueLatency: { readonly name: "weft.task.queue_latency"; readonly description: "Time tasks spend queued before dispatch in milliseconds"; readonly unit: "ms"; readonly type: "histogram"; }; readonly taskExecutionLatency: { readonly name: "weft.task.execution_latency"; readonly description: "Time tasks spend executing after worker start in milliseconds"; readonly unit: "ms"; readonly type: "histogram"; }; readonly taskRetries: { readonly name: "weft.task.retries"; readonly description: "Total task retry attempts after the first dispatch attempt"; readonly unit: "retries"; readonly type: "counter"; }; readonly taskRequeues: { readonly name: "weft.task.requeues"; readonly description: "Total visibility-timeout or disconnect task requeues"; readonly unit: "requeues"; readonly type: "counter"; }; readonly taskStaleHeartbeats: { readonly name: "weft.task.stale_heartbeats"; readonly description: "Number of in-flight tasks whose heartbeat age exceeds the diagnostic threshold"; readonly unit: "tasks"; readonly type: "gauge"; }; readonly workerCapacitySaturation: { readonly name: "weft.worker.capacity_saturation"; readonly description: "Ratio of in-flight worker slots to total worker concurrency"; readonly unit: "ratio"; readonly type: "gauge"; }; };