isIgnoredMetric checks if the metric should be ignored, as Coder agent doesn't use related features. Expected metric families: magicsock_*, derp_*, tstun_*, netcheck_*, portmap_*, etc.
(metricName string)
| 130 | // isIgnoredMetric checks if the metric should be ignored, as Coder agent doesn't use related features. |
| 131 | // Expected metric families: magicsock_*, derp_*, tstun_*, netcheck_*, portmap_*, etc. |
| 132 | func isIgnoredMetric(metricName string) bool { |
| 133 | if strings.HasPrefix(metricName, "dns_") || |
| 134 | strings.HasPrefix(metricName, "controlclient_") || |
| 135 | strings.HasPrefix(metricName, "peerapi_") || |
| 136 | strings.HasPrefix(metricName, "profiles_") || |
| 137 | strings.HasPrefix(metricName, "tstun_") { |
| 138 | return true |
| 139 | } |
| 140 | return false |
| 141 | } |
| 142 | |
| 143 | func asMetricType(typ clientmetric.Type) proto.Stats_Metric_Type { |
| 144 | switch typ { |