-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policystatemetrics: use observer.GetSensorManager()
policystatemetrics needs a reference to the sensor manager so that it can collect metrics. Currently, this reference is passed using observer.GetSensorManager() at initialization time. In observer tests, we currently do not restart the metrics (see [1]) which means that if we create a new observer, then the metrics will still reference the old sensor manager. Fix this by having policystatemetrics to call observer.GetSensorManager() to get the latest version of the sensor manager. [1] https://github.com/cilium/tetragon/blob/22eb995b19207ac0ced2dd83950ec8e8aedd122d/pkg/observer/observertesthelper/observer_test_helper.go#L272-L276 Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters