The signer exposes prometheus metrics, but because many of the RPC timers use the "raw" RPC path, it exposes a risk of high cardinality (ie many unique labels), especially when many signers are used across many networks.
To reduce that cardinality, the PR updates some of the RPC call timers to use a more "generic" path. For example, instead of /v2/accounts/SP123, it uses /v2/accounts/:stacks_address. Similarly, for read-only functions, the contract address is replaced with :principal, which will make the label the same across mainnet and testnet.
Reviewers: please double check the RPC timer labels in stacks_client.rs to ensure there aren't other timers that have dynamic values in them. Additionally, please double check that the labels are still descriptive enough.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
The signer exposes prometheus metrics, but because many of the RPC timers use the "raw" RPC path, it exposes a risk of high cardinality (ie many unique labels), especially when many signers are used across many networks.
To reduce that cardinality, the PR updates some of the RPC call timers to use a more "generic" path. For example, instead of
/v2/accounts/SP123
, it uses/v2/accounts/:stacks_address
. Similarly, for read-only functions, the contract address is replaced with:principal
, which will make the label the same across mainnet and testnet.Reviewers: please double check the RPC timer labels in
stacks_client.rs
to ensure there aren't other timers that have dynamic values in them. Additionally, please double check that the labels are still descriptive enough.