Problem:
We use Centrifugo to transmit data to our backend server via RPC calls and channel publications. However, we have a need to transmit telemetry for specific calls, which the current implementation does not support.
Proposal:
One solution we see is to extend the Centrifugo protocol to allow the transmission of metadata (key-value pairs) alongside data in RPC and Publish calls. This would enable specifying which keys should be processed and passed into headers during proxying of calls.
Solution Options:
-
Allow users to pass any string key-value pairs into metadata. However, this may lead to misuse.
-
Take a more localized approach, considering that telemetry might be needed not only by us but also by other Centrifugo users. Centrifugo could implement a metadata transmission mechanism, but only allow clients to send data that it supports, as specified in all client SDKs.