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

Added metrics for LRU data cache #2908

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

AshishNaware
Copy link
Contributor

@AshishNaware AshishNaware commented Sep 12, 2024

Fixes #679

Description

This PR adds additional metrics around LRU data cache such as size, capacity, evictions and cache miss in order to have a same set of metrics collection across the board.

Changelog

Add metrics for LRU data cache

@AshishNaware AshishNaware requested a review from a team as a code owner September 12, 2024 02:44
@lambdanis lambdanis added release-note/minor This PR introduces a minor user-visible change area/metrics Related to prometheus metrics labels Sep 13, 2024
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @AshishNaware, overall looks good to me. I left two comments about small details.

Tetragon metrics are also documented in a generated reference doc, so the new metrics must be added there too. To generate the metrics reference, run:

make metrics-docs

Then you should see updated doc files.

As a side note, at some point it might be nice to refactor, to have both process and observer cache use the same cache implementation, but with separate metrics. But this is out of scope in this PR.

pkg/observer/cache.go Outdated Show resolved Hide resolved
pkg/observer/cache.go Show resolved Hide resolved
Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit bd325a0
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/66ea2425f000040008d2d346
😎 Deploy Preview https://deploy-preview-2908--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

pkg/observer/cache.go Outdated Show resolved Hide resolved
pkg/observer/cache.go Show resolved Hide resolved
pkg/observer/cache.go Show resolved Hide resolved
Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, thanks!

@lambdanis lambdanis requested a review from mtardy September 17, 2024 19:08
@lambdanis
Copy link
Contributor

@AshishNaware Could you please squash the three commits and force push? That's a practice in the Tetragon project, to keep clean git history on the main branch. Currently one of the CI jobs is failing because one of the commit messages is too long.

@AshishNaware
Copy link
Contributor Author

@lambdanis @mtardy - I have squashed the commits and rebased the branch. This PR has now passed all the checks.

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

@lambdanis lambdanis merged commit 6dd72c0 into cilium:main Sep 24, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Related to prometheus metrics release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metrics for lru cache in pkg/observer/data.go
3 participants