@@ -101,17 +101,17 @@ func TestModule(t *testing.T) {
101101
102102 expectedMetric := fmt .Sprintf (
103103 `
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
107107 ` ,
108108 httpServer .URL ,
109109 )
110110
111111 err = testutil .GatherAndCompare (
112112 metricsRegistry ,
113113 strings .NewReader (expectedMetric ),
114- "foo_bar_httpclient_requests_total " ,
114+ "foo_bar_http_client_requests_total " ,
115115 )
116116 assert .NoError (t , err )
117117
@@ -158,10 +158,10 @@ func TestModule(t *testing.T) {
158158
159159 expectedMetric = fmt .Sprintf (
160160 `
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
165165 ` ,
166166 httpServer .URL ,
167167 httpServer .URL ,
@@ -170,7 +170,7 @@ func TestModule(t *testing.T) {
170170 err = testutil .GatherAndCompare (
171171 metricsRegistry ,
172172 strings .NewReader (expectedMetric ),
173- "foo_bar_httpclient_requests_total " ,
173+ "foo_bar_http_client_requests_total " ,
174174 )
175175 assert .NoError (t , err )
176176
@@ -217,11 +217,11 @@ func TestModule(t *testing.T) {
217217
218218 expectedMetric = fmt .Sprintf (
219219 `
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
225225 ` ,
226226 httpServer .URL ,
227227 httpServer .URL ,
@@ -231,7 +231,7 @@ func TestModule(t *testing.T) {
231231 err = testutil .GatherAndCompare (
232232 metricsRegistry ,
233233 strings .NewReader (expectedMetric ),
234- "foo_bar_httpclient_requests_total " ,
234+ "foo_bar_http_client_requests_total " ,
235235 )
236236 assert .NoError (t , err )
237237
@@ -279,12 +279,12 @@ func TestModule(t *testing.T) {
279279
280280 expectedMetric = fmt .Sprintf (
281281 `
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
288288 ` ,
289289 httpServer .URL ,
290290 httpServer .URL ,
@@ -296,7 +296,7 @@ func TestModule(t *testing.T) {
296296 err = testutil .GatherAndCompare (
297297 metricsRegistry ,
298298 strings .NewReader (expectedMetric ),
299- "foo_bar_httpclient_requests_total " ,
299+ "foo_bar_http_client_requests_total " ,
300300 )
301301 assert .NoError (t , err )
302302}
0 commit comments