Metrics for Multiple Subscription Protocol
- Dominant language
- Haskell
- Stars
- 135
- Forks
- 4
- Avg merge
- 21h 53m
- Merged PRs (30d)
- 1
Description
The PR of https://github.com/channable/icepeak/pull/119 implements the multiple subscription protocol.
However implementing metrics for the new protocol have been neglected, and one of the old metric endpoints is re-used and do not capture the semantic significance.
i.e:
https://github.com/channable/icepeak/blob/1e991b235ae68d3395ded371bfd9d8a376b88dbf/server/src/Icepeak/Server/WebsocketServer/MultiSubscription.hs#L283-L285
When a new client creates a multi-subscription connection, icepeak counts it as a subscriber, whereas in reality it can create more than one subscription.
The metrics that icepeak records can be found here:
https://github.com/channable/icepeak/blob/1e991b235ae68d3395ded371bfd9d8a376b88dbf/server/src/Icepeak/Server/Metrics.hs#L40-L73
We should create a new set of metric endpoints which capture data in accordance to how the new protocol functions. This could include:
- Number of subscriptions made on MultiSub protocol
- Number of connections on the MultiSub protocol
- Number of subscription deadline timeouts
- Payload failures
We also want to disambiguate the existing `icepeak_subscriber_count` to be explicitly SingleSub protocol connection count. Luckily `icepeak_subscriber_count` is the only metric that is fully tied to the SingleSub semantics.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading server/src/Icepeak/Server/WebsocketServer/MultiSubscription.hs around lines 283-285 and server/src/Icepeak/Server/Metrics.hs around lines 40-73. Trace how the multi-subscription protocol currently records metrics and compare that with the existing SingleSub semantics. Done means distinct metrics cover MultiSub subscriptions, connections, subscription deadline timeouts, and payload failures, while the existing subscriber count is explicitly SingleSub-specific.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100