@@ -101,17 +101,17 @@ func TestModule(t *testing.T) {
101
101
102
102
expectedMetric := fmt .Sprintf (
103
103
`
104
- # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests
105
- # TYPE foo_bar_httpclient_requests_total counter
106
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="2xx"} 1
104
+ # HELP foo_bar_http_client_requests_total Number of performed HTTP requests
105
+ # TYPE foo_bar_http_client_requests_total counter
106
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="2xx"} 1
107
107
` ,
108
108
httpServer .URL ,
109
109
)
110
110
111
111
err = testutil .GatherAndCompare (
112
112
metricsRegistry ,
113
113
strings .NewReader (expectedMetric ),
114
- "foo_bar_httpclient_requests_total " ,
114
+ "foo_bar_http_client_requests_total " ,
115
115
)
116
116
assert .NoError (t , err )
117
117
@@ -158,10 +158,10 @@ func TestModule(t *testing.T) {
158
158
159
159
expectedMetric = fmt .Sprintf (
160
160
`
161
- # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests
162
- # TYPE foo_bar_httpclient_requests_total counter
163
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="2xx"} 1
164
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="4xx"} 1
161
+ # HELP foo_bar_http_client_requests_total Number of performed HTTP requests
162
+ # TYPE foo_bar_http_client_requests_total counter
163
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="2xx"} 1
164
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="4xx"} 1
165
165
` ,
166
166
httpServer .URL ,
167
167
httpServer .URL ,
@@ -170,7 +170,7 @@ func TestModule(t *testing.T) {
170
170
err = testutil .GatherAndCompare (
171
171
metricsRegistry ,
172
172
strings .NewReader (expectedMetric ),
173
- "foo_bar_httpclient_requests_total " ,
173
+ "foo_bar_http_client_requests_total " ,
174
174
)
175
175
assert .NoError (t , err )
176
176
@@ -217,11 +217,11 @@ func TestModule(t *testing.T) {
217
217
218
218
expectedMetric = fmt .Sprintf (
219
219
`
220
- # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests
221
- # TYPE foo_bar_httpclient_requests_total counter
222
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="2xx"} 1
223
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="4xx"} 1
224
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="5xx"} 1
220
+ # HELP foo_bar_http_client_requests_total Number of performed HTTP requests
221
+ # TYPE foo_bar_http_client_requests_total counter
222
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="2xx"} 1
223
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="4xx"} 1
224
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="5xx"} 1
225
225
` ,
226
226
httpServer .URL ,
227
227
httpServer .URL ,
@@ -231,7 +231,7 @@ func TestModule(t *testing.T) {
231
231
err = testutil .GatherAndCompare (
232
232
metricsRegistry ,
233
233
strings .NewReader (expectedMetric ),
234
- "foo_bar_httpclient_requests_total " ,
234
+ "foo_bar_http_client_requests_total " ,
235
235
)
236
236
assert .NoError (t , err )
237
237
@@ -279,12 +279,12 @@ func TestModule(t *testing.T) {
279
279
280
280
expectedMetric = fmt .Sprintf (
281
281
`
282
- # HELP foo_bar_httpclient_requests_total Number of performed HTTP requests
283
- # TYPE foo_bar_httpclient_requests_total counter
284
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="2xx"} 1
285
- foo_bar_httpclient_requests_total {host="%s",method="GET",path="%s",status="3xx"} 1
286
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="4xx"} 1
287
- foo_bar_httpclient_requests_total {host="%s",method="POST",path="",status="5xx"} 1
282
+ # HELP foo_bar_http_client_requests_total Number of performed HTTP requests
283
+ # TYPE foo_bar_http_client_requests_total counter
284
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="2xx"} 1
285
+ foo_bar_http_client_requests_total {host="%s",method="GET",path="%s",status="3xx"} 1
286
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="4xx"} 1
287
+ foo_bar_http_client_requests_total {host="%s",method="POST",path="",status="5xx"} 1
288
288
` ,
289
289
httpServer .URL ,
290
290
httpServer .URL ,
@@ -296,7 +296,7 @@ func TestModule(t *testing.T) {
296
296
err = testutil .GatherAndCompare (
297
297
metricsRegistry ,
298
298
strings .NewReader (expectedMetric ),
299
- "foo_bar_httpclient_requests_total " ,
299
+ "foo_bar_http_client_requests_total " ,
300
300
)
301
301
assert .NoError (t , err )
302
302
}
0 commit comments