57
57
58
58
// Views
59
59
var (
60
- bounds = []float64 {0 , 1 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 , 200 , 300 , 400 , 500 , 1000 , 2000 , 5000 }
61
- builtinViews = []* view.View {
60
+ providerTagKey , _ = tag .NewKey ("provider" )
61
+ bounds = []float64 {0 , 1 , 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 , 200 , 300 , 400 , 500 , 1000 , 2000 , 5000 }
62
+ builtinViews = []* view.View {
62
63
{Measure : PostProviderRegisterLatency , Aggregation : view .Distribution (bounds ... )},
63
64
{Measure : GetProviderHeadLatency , Aggregation : view .Distribution (bounds ... )},
64
65
{Measure : GetRegisteredProviderInfoLatency , Aggregation : view .Distribution (bounds ... )},
68
69
{Measure : GetMetadataInclusionLatency , Aggregation : view .Distribution (bounds ... )},
69
70
{Measure : PostMetadataQueryLatency , Aggregation : view .Distribution (bounds ... )},
70
71
{Measure : GraphPersistenceLatency , Aggregation : view .Distribution (bounds ... )},
71
- {Measure : ProviderNotificationCount , Aggregation : view .Count ()},
72
- {Measure : ProviderPayloadCount , Aggregation : view .Count ()},
72
+ {Measure : ProviderNotificationCount , Aggregation : view .Count (), TagKeys : []tag. Key { providerTagKey } },
73
+ {Measure : ProviderPayloadCount , Aggregation : view .Count (), TagKeys : []tag. Key { providerTagKey } },
73
74
}
74
75
)
75
76
@@ -90,7 +91,7 @@ func Counter(ctx context.Context, m *stats.Int64Measure, t string, c int64) func
90
91
return func () {
91
92
_ = stats .RecordWithOptions (
92
93
ctx ,
93
- stats .WithTags (tag .Insert (metrics . Method , t )),
94
+ stats .WithTags (tag .Insert (providerTagKey , t )),
94
95
stats .WithMeasurements (m .M (c )),
95
96
)
96
97
}
0 commit comments