wrapper: prometheus attach labels to all metrics

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-02-04 01:26:31 +03:00
parent 6aff955f07
commit d927ad4673
2 changed files with 22 additions and 12 deletions

View File

@@ -87,6 +87,10 @@ func TestPrometheusMetrics(t *testing.T) {
metric := findMetricByName(list, dto.MetricType_SUMMARY, "micro_upstream_latency_microseconds")
if metric == nil || metric.Metric == nil || len(metric.Metric) == 0 {
t.Fatalf("no metrics returned")
}
for _, v := range metric.Metric[0].Label {
switch *v.Name {
case "micro_dc":