@@ -92,38 +92,38 @@ var (
9292 // The value of this tag can be controlled by the HTTP client, so you need
9393 // to watch out for potentially generating high-cardinality labels in your
9494 // metrics backend if you use this tag in views.
95- Host , _ = tag .NewKey ("http.host" )
95+ Host = tag .MustNewKey ("http.host" )
9696
9797 // StatusCode is the numeric HTTP response status code,
9898 // or "error" if a transport error occurred and no status code was read.
99- StatusCode , _ = tag .NewKey ("http.status" )
99+ StatusCode = tag .MustNewKey ("http.status" )
100100
101101 // Path is the URL path (not including query string) in the request.
102102 //
103103 // The value of this tag can be controlled by the HTTP client, so you need
104104 // to watch out for potentially generating high-cardinality labels in your
105105 // metrics backend if you use this tag in views.
106- Path , _ = tag .NewKey ("http.path" )
106+ Path = tag .MustNewKey ("http.path" )
107107
108108 // Method is the HTTP method of the request, capitalized (GET, POST, etc.).
109- Method , _ = tag .NewKey ("http.method" )
109+ Method = tag .MustNewKey ("http.method" )
110110
111111 // KeyServerRoute is a low cardinality string representing the logical
112112 // handler of the request. This is usually the pattern registered on the a
113113 // ServeMux (or similar string).
114- KeyServerRoute , _ = tag .NewKey ("http_server_route" )
114+ KeyServerRoute = tag .MustNewKey ("http_server_route" )
115115)
116116
117117// Client tag keys.
118118var (
119119 // KeyClientMethod is the HTTP method, capitalized (i.e. GET, POST, PUT, DELETE, etc.).
120- KeyClientMethod , _ = tag .NewKey ("http_client_method" )
120+ KeyClientMethod = tag .MustNewKey ("http_client_method" )
121121 // KeyClientPath is the URL path (not including query string).
122- KeyClientPath , _ = tag .NewKey ("http_client_path" )
122+ KeyClientPath = tag .MustNewKey ("http_client_path" )
123123 // KeyClientStatus is the HTTP status code as an integer (e.g. 200, 404, 500.), or "error" if no response status line was received.
124- KeyClientStatus , _ = tag .NewKey ("http_client_status" )
124+ KeyClientStatus = tag .MustNewKey ("http_client_status" )
125125 // KeyClientHost is the value of the request Host header.
126- KeyClientHost , _ = tag .NewKey ("http_client_host" )
126+ KeyClientHost = tag .MustNewKey ("http_client_host" )
127127)
128128
129129// Default distributions used by views in this package.
0 commit comments