Add 'broadcasting' label to Action Cable counter
What does this MR do and why?
We are looking to refine existing Action Cable metrics to better forecast usage and event volume.
This MR takes a first step by adding a broadcasting
label to the action_cable_broadcasts_total
counter.
This allows us to see which Redis PubSub topics we most frequently broadcast too.
Extra data volume
I took care not to let extra data served into Prometheus get out of hand by collapsing broadcastings (pubsub channel names) with high cardinality, such as those including IDs. The code is quite defensive currently because any unknown broadcasting is rolled into the other
label. This should avoid unpleasant surprises in label dimensionality should we ever use additional pubsub channels.
Screenshots or screen recordings
How to set up and validate locally
- Hit a page that opens a websocket connection, e.g. the issue page
- Trigger a sub that goes over Action Cable by changing labels or the epic link
- grep the
/-/metrics
endpoint foraction_cable_broadcasts_total
which should carry the new label
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #404957 (closed)