-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): reduce metrics resources #123
Conversation
What do you think about keeping the TCP probes histogram but removing the location dimension? It seems like that should reduce the usage by a large factor without losing the visibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
@bemasc I restored the tcp probe metric, without location. Another look? |
dataBytes *prometheus.CounterVec | ||
timeToCipherMs *prometheus.HistogramVec | ||
buildInfo *prometheus.GaugeVec | ||
accessKeys prometheus.Gauge |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -208,20 +208,20 @@ func isFound(accessKey string) string { | |||
} | |||
|
|||
// addIfNonZero helps avoid the creation of series that are always zero. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This PR:
location
from theshadowsocks_tcp_probes
time series, which is the largest one.shadowsocks_data_bytes
. We were creating 4 entries (each proxy leg) for every country that attempted to connect, even if they were unsuccessful connections. The metric was dominated by zeros.shadowsocks_data_bytes
by removing the status and location. We don't need that for data limits. To enable country usage tracking, I introduceshadowsocks_data_bytes_per_location
. To enable status tracking for UDP, I introduceshadowsocks_udp_packets_from_client_per_location
. TCP already hadshadowsocks_connections_closed
for status tracking.