packages feed

shibuya-metrics 0.7.1.0 → 0.8.0.0

raw patch · 8 files changed

+25/−16 lines, 8 filesdep −unliftiodep ~shibuya-corePVP ok

version bump matches the API change (PVP)

Dependencies removed: unliftio

Dependency ranges changed: shibuya-core

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,18 @@ # Changelog +## 0.8.0.0 — 2026-07-04++### Breaking Changes++- Version bumped to track `shibuya-core` 0.8.0.0.+- The Prometheus endpoint no longer emits+  `shibuya_messages_dropped_total`; `shibuya-core` removed the always-zero+  `StreamStats.dropped` counter.+- Internal imports moved from `Shibuya.Runner.Master` and+  `Shibuya.Runner.Metrics` to the new public paths `Shibuya.App` and+  `Shibuya.Core.Metrics`. Application code using `shibuya-metrics` through+  `Shibuya.Metrics` does not need to change.+ ## 0.7.1.0 — 2026-06-15  Version bumped to track `shibuya-core` 0.7.1.0. No user-visible changes
shibuya-metrics.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.12 name: shibuya-metrics-version: 0.7.1.0+version: 0.8.0.0 synopsis: Metrics web server for Shibuya queue processing framework description:   Provides HTTP/JSON, Prometheus, and WebSocket endpoints for@@ -48,11 +48,10 @@     containers ^>=0.7,     http-types ^>=0.12,     prometheus-client ^>=1.1,-    shibuya-core ^>=0.7.1.0,+    shibuya-core ^>=0.8.0.0,     stm ^>=2.5,     text ^>=2.1,     time ^>=1.14,-    unliftio ^>=0.2,     wai ^>=3.2,     wai-websockets ^>=3.0,     warp ^>=3.4,
src/Shibuya/Metrics/Health.hs view
@@ -30,8 +30,8 @@ import Data.Maybe (isJust) import Data.Text (Text) import Data.Time.Clock (NominalDiffTime, UTCTime, diffUTCTime, getCurrentTime)-import Shibuya.Runner.Master (Master, getAllMetricsIO)-import Shibuya.Runner.Metrics+import Shibuya.App (Master, getAllMetricsIO)+import Shibuya.Core.Metrics   ( MetricsMap,     ProcessorMetrics (..),     ProcessorState (..),
src/Shibuya/Metrics/JSON.hs view
@@ -16,6 +16,8 @@     status503,   ) import Network.Wai (Application, Response, pathInfo, responseLBS)+import Shibuya.App (Master, getAllMetricsIO, getProcessorMetricsIO)+import Shibuya.Core.Metrics (ProcessorId (..)) import Shibuya.Metrics.Health   ( DependencyCheck,     HealthConfig,@@ -26,8 +28,6 @@     checkReadiness,     defaultHealthConfig,   )-import Shibuya.Runner.Master (Master, getAllMetricsIO, getProcessorMetricsIO)-import Shibuya.Runner.Metrics (ProcessorId (..))  -- | WAI application for JSON endpoints (without dependency checks). -- Handles:
src/Shibuya/Metrics/Prometheus.hs view
@@ -11,8 +11,8 @@ import Data.Text.Encoding qualified as Text import Network.HTTP.Types (hContentType, status200) import Network.Wai (Application, responseLBS)-import Shibuya.Runner.Master (Master, getAllMetricsIO)-import Shibuya.Runner.Metrics+import Shibuya.App (Master, getAllMetricsIO)+import Shibuya.Core.Metrics   ( InFlightInfo (..),     MetricsMap,     ProcessorId (..),@@ -43,9 +43,6 @@       renderHelp "shibuya_messages_processed_total" "Total messages successfully processed",       renderType "shibuya_messages_processed_total" "counter",       renderGaugeMetrics "shibuya_messages_processed_total" (fromIntegral . (.stats.processed)) metrics,-      renderHelp "shibuya_messages_dropped_total" "Total messages dropped due to backpressure",-      renderType "shibuya_messages_dropped_total" "counter",-      renderGaugeMetrics "shibuya_messages_dropped_total" (fromIntegral . (.stats.dropped)) metrics,       renderHelp "shibuya_messages_failed_total" "Total messages that failed processing",       renderType "shibuya_messages_failed_total" "counter",       renderGaugeMetrics "shibuya_messages_failed_total" (fromIntegral . (.stats.failed)) metrics,
src/Shibuya/Metrics/Server.hs view
@@ -23,13 +23,13 @@ import Network.Wai.Handler.Warp qualified as Warp import Network.Wai.Handler.WebSockets qualified as WaiWS import Network.WebSockets qualified as WS+import Shibuya.App (Master) import Shibuya.Metrics.Config (MetricsServerConfig (..), defaultConfig) import Shibuya.Metrics.Health (DependencyCheck, HealthConfig (..)) import Shibuya.Metrics.JSON (jsonAppWithHealth) import Shibuya.Metrics.Prometheus (prometheusApp) import Shibuya.Metrics.Types (MetricsServer (..)) import Shibuya.Metrics.WebSocket (WebSocketState, newWebSocketState, websocketApp)-import Shibuya.Runner.Master (Master)  -- | Start the metrics server without dependency checks. -- Returns a handle that can be used to stop the server.
src/Shibuya/Metrics/Types.hs view
@@ -22,7 +22,7 @@ import Data.Text qualified as Text import GHC.Generics (Generic) import Network.Wai.Handler.Warp (Port)-import Shibuya.Runner.Metrics (MetricsMap, ProcessorId, ProcessorMetrics)+import Shibuya.Core.Metrics (MetricsMap, ProcessorId, ProcessorMetrics)  -------------------------------------------------------------------------------- -- WebSocket Protocol
src/Shibuya/Metrics/WebSocket.hs view
@@ -24,10 +24,10 @@ import Data.Set (Set) import Data.Set qualified as Set import Network.WebSockets qualified as WS+import Shibuya.App (Master, getAllMetricsIO)+import Shibuya.Core.Metrics (MetricsMap, ProcessorId (..), ProcessorMetrics) import Shibuya.Metrics.Config (MetricsServerConfig (..)) import Shibuya.Metrics.Types (ClientMessage (..), ServerMessage (..))-import Shibuya.Runner.Master (Master, getAllMetricsIO)-import Shibuya.Runner.Metrics (MetricsMap, ProcessorId (..), ProcessorMetrics)  -------------------------------------------------------------------------------- -- WebSocket State