refactor(datafmt): use "udp" instead of "quic" (#946)

This diff changes the data format to prefer "udp" to "quic" everywhere we were previously using "quic".

Previously, the code inconsistently used "quic" for operations where we knew we were using "quic" and "udp" otherwise (e.g., for generic operations like ReadFrom).

While it would be more correct to say that a specific HTTP request used "quic" rather than "udp", using "udp" consistently allows one to see how distinct events such as ReadFrom and an handshake all refer to the same address, port, and protocol triple. Therefore, this change makes it easier to programmatically unpack a single measurement and create endpoint stats.

Before implementing this change, I discussed the problem with @hellais who mentioned that ooni/data is not currently using the "quic" string anywhere. I know that ooni/pipeline also doesn't rely on this string. The only users of this feature have been research-oriented experiments such as urlgetter, for which such a change would actually be acceptable.

See https://github.com/ooni/probe/issues/2238 and https://github.com/ooni/spec/pull/262.
This commit is contained in:
Simone Basso
2022-09-08 17:19:59 +02:00
committed by GitHub
parent 800217d15b
commit b78b9aca51
21 changed files with 66 additions and 66 deletions
@@ -97,7 +97,7 @@ to need more information to characterize the endpoint.
In fact, in the above definition we recognize fields
we have already discussed, such as:
- `Network`, describing whether to use "tcp" or "quic";
- `Network`, describing whether to use "tcp" or "udp";
- `Address`, which is the endpoint address.
+1 -1
View File
@@ -98,7 +98,7 @@ func main() {
// In fact, in the above definition we recognize fields
// we have already discussed, such as:
//
// - `Network`, describing whether to use "tcp" or "quic";
// - `Network`, describing whether to use "tcp" or "udp";
//
// - `Address`, which is the endpoint address.
//