-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fixed eBPF Feature Detection (#1443)
On working to migrate to cilium/ebpf I started to hit issues with nil pointer dereferences that indicated that something odd was happening between eBPF feature detection and metrics export. I discovered that there were additional global variables in many of the packages whose values are set before eBPF feature detection has happened. It appears that in these cases - through the various layers of indirection - we may try and read/write metrics that do not exist causing a nil pointer dereference. There appear to be several places where we're accessing map keys without checking they are nil - that will need to be fixed in a follow up. This PR attempts to at least ensure that from the BPF side that the keys we expect to exist, do actually exist in the maps that matter. eBPF feature detection how produces a bpf.SupportedMetrics struct, which is now consumed in various places in the codebase to ensure that the metrics we're exporting match those supported by the eBPF exporter. Signed-off-by: Dave Tucker <[email protected]>
- Loading branch information
1 parent
5f59172
commit 0baec47
Showing
39 changed files
with
348 additions
and
387 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
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
Oops, something went wrong.