You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2] Strip credentials/paths from endpoint URLs used as metric labels and in logs #49
Endpoint URLs are used verbatim as metric label values and in logs:
endpoint and target_endpoint labels in drift (--reference-node, --full-nodes)
consensus RPC endpoints in balance
startup logs
Provider URLs often embed API keys (for example https://…/v2/<KEY>) or userinfo (https://user:pass@host). Those secrets end up in Prometheus, its remote storage, and the logs.
Proposed fix
Add a small helper that keeps only scheme://host[:port] (dropping userinfo, path and query) for labels and logs. Use the full URL only to dial.
Pros / Cons
✅ No credential leakage.
⚠️ Two endpoints on the same host with different paths would collapse into one label. Accept this, or append a short hash of the path.
Still valid after #58. Drift now keeps one client per endpoint, but the endpoint/target_endpoint labels and logs still use the raw URL. Balance gained parseEndpoint in internal/clients/cosmos (it drops the scheme and path when dialing), but ConsensusRpcEndpoint* labels still use the raw --balance.consensus-rpc-urls value.
Activity
auricom commentedon Oct 20, 2026
Still valid after #58. Drift now keeps one client per endpoint, but the
endpoint/target_endpointlabels and logs still use the raw URL. Balance gainedparseEndpointininternal/clients/cosmos(it drops the scheme and path when dialing), butConsensusRpcEndpoint*labels still use the raw--balance.consensus-rpc-urlsvalue.