feat(oohelperd): add prometheus metrics (#897)
Closes https://github.com/ooni/probe/issues/2183 While there, avoid exposing nil values for optional fields of the THResponse struct (i.e., "ip_info" and "tls_handshake"). While there, fix `measurexlite`'s `OperationLogger` test and make it deterministic rather than racy.
This commit is contained in:
@@ -78,8 +78,8 @@ const (
|
||||
// THResponse is the response from the control service.
|
||||
type THResponse struct {
|
||||
TCPConnect map[string]THTCPConnectResult `json:"tcp_connect"`
|
||||
TLSHandshake map[string]THTLSHandshakeResult `json:"tls_handshake"`
|
||||
TLSHandshake map[string]THTLSHandshakeResult `json:"tls_handshake,omitempty"`
|
||||
HTTPRequest THHTTPRequestResult `json:"http_request"`
|
||||
DNS THDNSResult `json:"dns"`
|
||||
IPInfo map[string]*THIPInfo `json:"ip_info"`
|
||||
IPInfo map[string]*THIPInfo `json:"ip_info,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user