diff --git a/Sources/App/CapServer.swift b/Sources/App/CapServer.swift index c1c63e7..7733070 100644 --- a/Sources/App/CapServer.swift +++ b/Sources/App/CapServer.swift @@ -460,9 +460,15 @@ final class CapServer { // MARK: Monitoring - private let capCountMetric = Metric("caps.count") + private let capCountMetric = Metric("caps.count", + name: "Number of caps", + description: "The total number of caps in the database") - private let imageCountMetric = Metric("caps.images") + private let imageCountMetric = Metric("caps.images", + name: "Total images", + description: "The total number of images for all caps") - private let classifierMetric = Metric("caps.classifier") + private let classifierMetric = Metric("caps.classifier", + name: "Classifier Version", + description: "The current version of the image classifier") } diff --git a/Sources/App/configure.swift b/Sources/App/configure.swift index 05971f5..38b453f 100755 --- a/Sources/App/configure.swift +++ b/Sources/App/configure.swift @@ -18,7 +18,9 @@ public func configure(_ app: Application) throws { // All new metrics are automatically registered with the standard observer MetricObserver.standard = monitor - let status = Metric("caps.status") + let status = Metric("caps.status", + name: "Status", + description: "The general status of the service") status.update(.initializing) let server = CapServer(in: URL(fileURLWithPath: publicDirectory))