Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.15] metrics: prepare to increase cardinality of BPF metrics key #31558

Merged
merged 1 commit into from Mar 27, 2024

Conversation

ti-mo
Copy link
Contributor

@ti-mo ti-mo commented Mar 22, 2024

Once this PR is merged, a GitHub action will update the labels of these PRs:

 30972

[ upstream commit b41b78d ]

This commit is split off from subsequent commits to backport to 1.15.

In a follow-up commit, the reserved space in metricsmap.Key will be used for
storing line and file info. Since older versions of Cilium don't decode these
fields yet, this either causes duplicate metrics to be displayed, or causes
the last metricsmap entry with a given reason/direction combination to
overwrite the counters of other entries, resulting in wrong metrics.

metricsmapCollector.Collect() was believed to handle this correctly, but the
code turned out to be wrong. The updated implementation sums up all values
that resolve to the same label set.

Various cleanups were made to remove type conversions and improve legibility.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo added kind/backports This PR provides functionality previously merged into master. backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. labels Mar 22, 2024
@ti-mo ti-mo changed the title v1.15 Backports 2024-03-22 [v1.15] metrics: prepare to increase cardinality of BPF metrics key Mar 22, 2024
@ti-mo
Copy link
Contributor Author

ti-mo commented Mar 22, 2024

/test-backport-1.15

@ti-mo ti-mo marked this pull request as ready for review March 22, 2024 13:51
@ti-mo ti-mo requested a review from a team as a code owner March 22, 2024 13:51
@ti-mo ti-mo merged commit c70feff into v1.15 Mar 27, 2024
220 checks passed
@ti-mo ti-mo deleted the pr/v1.15-backport-2024-03-22-01-42 branch March 27, 2024 13:38
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.15 This PR represents a backport for Cilium 1.15.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants