You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `Exporter` type used to own the userspace `Metrics` object and all
other objects would grab the metrics they needed from there. However,
because `Exporter` requires the `Bpf` object to take the kernel metrics
map from it and the `Bpf` object requires the `Exporter` to get its
userspace metrics from, it created a pretty naste chicken and egg
problem. With the addition of the replay feature, this became a bit of
a mess.
To clean up the code a bit, `Metrics` is no longer owned by `Exporter`,
instead an independent instance of `Metrics` is created and the bits
needed by other components are passed to them, then an `Exporter` is
created which registers all metrics from this same object. With this,
the new `setup_input` method can return a tuple with
`Option<KernelMetrics>` and the receiver end of the generated events,
which is cleaner than returning the entire exporter.
0 commit comments