ooni / netx

OONI's Go net and net/http extensions for performing network measurements
https://ooni.org
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Request- or context-rooted measurements #23

Closed bassosimone closed 4 years ago

bassosimone commented 5 years ago

As a user of the netx API, I would like to be able to automatically know what events have been generated by a specific *http.Request. In the same vein, I would like to know what events have been generated by code using a specific context.Context. Because we can assign a context to a request, the most general case is the latter. That is, we could always implement request-rooted measurements using context-rooted measurements.

The use case for this functionality is easily getting measurements that are part of the same round-trip, or round-trips, without the need to join them in post-processing and/or without preventing concurrent round-trips, like we do in ooni/probe-engine now.

With this functionality implemented, I doubt we will ever need to join measurements, because we could know by definition that a specific request is the root cause of a specific list of low-level measurements.

This is not super urgent, because we can thrive in ooni/probe-engine even without this functionality, but our life would be easier with this functionality merged. Also, this probably solves the most pressing concern of netx's original design, i.e. joining measurements.

bassosimone commented 4 years ago

This has now landed in master