fix(measurex): use same keys of the OONI data format (#572)
This change should simplify the pipeline's job. Reference issue: https://github.com/ooni/probe/issues/1817. I previously dismissed this possibility, but now it seems clear it is simpler to have a very tabular data format internally and to convert such a format to OONI's data format when serializing. The OONI data format is what the pipeline expects, but processing is easier with a more linear/tabular format.
This commit is contained in:
@@ -111,7 +111,8 @@ We are almost done now: we loop over all the endpoints and apply the
|
||||
}
|
||||
```
|
||||
|
||||
Finally, we print the results.
|
||||
Finally, we print the results. (Note that here we are not
|
||||
converting to the OONI archival data format.)
|
||||
|
||||
```Go
|
||||
print(m)
|
||||
@@ -128,7 +129,10 @@ go run -race ./internal/tutorial/measurex/chapter07 | jq
|
||||
```
|
||||
|
||||
Please, check the JSON output. Do you recognize the fields
|
||||
we have described in previous chapters?
|
||||
we have described in previous chapters, even though we didn't
|
||||
convert to the OONI data format? Can you modify the code to
|
||||
use the OONI data format in the output by calling the proper
|
||||
conversion functions exported by `measurex`?
|
||||
|
||||
Can you provoke common errors such as DNS resolution
|
||||
errors, TCP connect errors, TLS handshake errors, and
|
||||
|
||||
@@ -112,7 +112,8 @@ func main() {
|
||||
}
|
||||
// ```
|
||||
//
|
||||
// Finally, we print the results.
|
||||
// Finally, we print the results. (Note that here we are not
|
||||
// converting to the OONI archival data format.)
|
||||
//
|
||||
// ```Go
|
||||
print(m)
|
||||
@@ -129,7 +130,10 @@ func main() {
|
||||
// ```
|
||||
//
|
||||
// Please, check the JSON output. Do you recognize the fields
|
||||
// we have described in previous chapters?
|
||||
// we have described in previous chapters, even though we didn't
|
||||
// convert to the OONI data format? Can you modify the code to
|
||||
// use the OONI data format in the output by calling the proper
|
||||
// conversion functions exported by `measurex`?
|
||||
//
|
||||
// Can you provoke common errors such as DNS resolution
|
||||
// errors, TCP connect errors, TLS handshake errors, and
|
||||
|
||||
Reference in New Issue
Block a user