@@ -43,27 +43,23 @@ func TestSuccessfulUnderlyingCalls(t *testing.T) {
43
43
mrs .FindTraces (context .Background (), & spanstore.TraceQueryParameters {})
44
44
counters , gauges := mf .Snapshot ()
45
45
expecteds := map [string ]int64 {
46
- "get_operations.attempts" : 1 ,
47
- "get_operations.successes" : 1 ,
48
- "get_operations.errors" : 0 ,
49
- "get_trace.attempts" : 1 ,
50
- "get_trace.successes" : 1 ,
51
- "get_trace.errors" : 0 ,
52
- "find_traces.attempts" : 1 ,
53
- "find_traces.successes" : 1 ,
54
- "find_traces.errors" : 0 ,
55
- "get_services.attempts" : 1 ,
56
- "get_services.successes" : 1 ,
57
- "get_services.errors" : 0 ,
46
+ "get_operations.requests|result=ok" : 1 ,
47
+ "get_operations.requests|result=err" : 0 ,
48
+ "get_trace.requests|result=ok" : 1 ,
49
+ "get_trace.requests|result=err" : 0 ,
50
+ "find_traces.requests|result=ok" : 1 ,
51
+ "find_traces.requests|result=err" : 0 ,
52
+ "get_services.requests|result=ok" : 1 ,
53
+ "get_services.requests|result=err" : 0 ,
58
54
}
59
55
60
56
existingKeys := []string {
61
- "get_operations.okLatency .P50" ,
57
+ "get_operations.latency|result=ok .P50" ,
62
58
"get_trace.responses.P50" ,
63
- "find_traces.okLatency .P50" , // this is not exhaustive
59
+ "find_traces.latency|result=ok .P50" , // this is not exhaustive
64
60
}
65
61
nonExistentKeys := []string {
66
- "get_operations.errLatency .P50" ,
62
+ "get_operations.latency|result=err .P50" ,
67
63
}
68
64
69
65
checkExpectedExistingAndNonExistentCounters (t , counters , expecteds , gauges , existingKeys , nonExistentKeys )
@@ -100,28 +96,24 @@ func TestFailingUnderlyingCalls(t *testing.T) {
100
96
mrs .FindTraces (context .Background (), & spanstore.TraceQueryParameters {})
101
97
counters , gauges := mf .Snapshot ()
102
98
expecteds := map [string ]int64 {
103
- "get_operations.attempts" : 1 ,
104
- "get_operations.successes" : 0 ,
105
- "get_operations.errors" : 1 ,
106
- "get_trace.attempts" : 1 ,
107
- "get_trace.successes" : 0 ,
108
- "get_trace.errors" : 1 ,
109
- "find_traces.attempts" : 1 ,
110
- "find_traces.successes" : 0 ,
111
- "find_traces.errors" : 1 ,
112
- "get_services.attempts" : 1 ,
113
- "get_services.successes" : 0 ,
114
- "get_services.errors" : 1 ,
99
+ "get_operations.requests|result=ok" : 0 ,
100
+ "get_operations.requests|result=err" : 1 ,
101
+ "get_trace.requests|result=ok" : 0 ,
102
+ "get_trace.requests|result=err" : 1 ,
103
+ "find_traces.requests|result=ok" : 0 ,
104
+ "find_traces.requests|result=err" : 1 ,
105
+ "get_services.requests|result=ok" : 0 ,
106
+ "get_services.requests|result=err" : 1 ,
115
107
}
116
108
117
109
existingKeys := []string {
118
- "get_operations.errLatency .P50" ,
110
+ "get_operations.latency|result=err .P50" ,
119
111
}
120
112
121
113
nonExistentKeys := []string {
122
- "get_operations.okLatency .P50" ,
114
+ "get_operations.latency|result=ok .P50" ,
123
115
"get_trace.responses.P50" ,
124
- "query.okLatency .P50" , // this is not exhaustive
116
+ "query.latency|result=ok .P50" , // this is not exhaustive
125
117
}
126
118
127
119
checkExpectedExistingAndNonExistentCounters (t , counters , expecteds , gauges , existingKeys , nonExistentKeys )
0 commit comments