fix(webconnectivity): expose network events (#258)
* fix(webconnectivity): expose network events By not exposing network events in webconnectivity, we are missing several interesting, explanatory data points. This diff fixes the issue by: 1. enriching the definition of network events to include extra data useful for performing (manual) data analysis; 2. adding a tags field to network events such that we can add tags to specific events and understand where they come from; 3. exposing all the (tagged) network events that happen when running a webconnectivity experiment. See https://github.com/ooni/probe-engine/issues/1157. * progress * more work towards landing this diff * Apply suggestions from code review
This commit is contained in:
parent
70d7c1a22c
commit
fc19c9901a
6 changed files with 67 additions and 16 deletions
|
|
@ -3,6 +3,7 @@ package webconnectivity
|
|||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/model"
|
||||
|
|
@ -10,6 +11,7 @@ import (
|
|||
|
||||
// ConnectsConfig contains the config for Connects
|
||||
type ConnectsConfig struct {
|
||||
Begin time.Time
|
||||
Session model.ExperimentSession
|
||||
TargetURL *url.URL
|
||||
URLGetterURLs []string
|
||||
|
|
@ -28,7 +30,7 @@ type ConnectsResult struct {
|
|||
// check whether the resolved endpoints are reachable.
|
||||
func Connects(ctx context.Context, config ConnectsConfig) (out ConnectsResult) {
|
||||
out.AllKeys = []urlgetter.TestKeys{}
|
||||
multi := urlgetter.Multi{Session: config.Session}
|
||||
multi := urlgetter.Multi{Begin: config.Begin, Session: config.Session}
|
||||
inputs := []urlgetter.MultiInput{}
|
||||
for _, url := range config.URLGetterURLs {
|
||||
inputs = append(inputs, urlgetter.MultiInput{
|
||||
|
|
|
|||
Loading…
Reference in a new issue