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

[SPIRE Agent] add telemetry around LRU cache entry operations #4335

Merged

Conversation

hugordon7
Copy link
Contributor

@hugordon7 hugordon7 commented Jul 11, 2023

Affected functionality

Adds metrics around LRU cache entry operations. On every LRU cache entry add, update, and removal, a counter is incremented. After each call to update entries and SVIDs, the total size of the entry and SVID map is reported.

Also renames the ExpiresAt field to SVIDExpiresAt in the StaleEntries struct and adds an additional log field entry_id to a log.

Description of change
Additional observability into LRU cache entry operations and memory usage.

Which issue this PR fixes

N/A

Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch from 9681c60 to 2270bc9 Compare July 11, 2023 20:10
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch from 2ec9ca8 to ab32e25 Compare July 12, 2023 12:36
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch from 6b2556f to 1a7e20c Compare July 12, 2023 18:35
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch from d02d89e to 3dc6d1a Compare July 12, 2023 18:46
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@evan2645 evan2645 self-assigned this Jul 13, 2023
doc/telemetry.md Outdated Show resolved Hide resolved
@amoore877
Copy link
Member

I think that's the last of my comments. Eager to see what the maintainers and rest of the community think :)

Copy link
Member

@evan2645 evan2645 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @hugordon7 and for the review @amoore877!

@evan2645
Copy link
Member

@hugordon7 we need a DCO on the commit in order to merge it. You can read more about DCO here, you can use -s flag with git commit to add it. All commits in the PR need one set so you'll probably need to force push

@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch 3 times, most recently from 1b81e7e to c5de92a Compare July 18, 2023 18:59
Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
@hugordon7 hugordon7 force-pushed the gordonhu-add-agent-lru-cache-telemetry branch from c5de92a to 6d8851b Compare July 18, 2023 20:22
@evan2645 evan2645 merged commit a3d3cb8 into spiffe:main Jul 20, 2023
Neniel pushed a commit to Neniel/spire that referenced this pull request Jul 21, 2023
…#4335)

* [SPIRE Agent] add telemetry around LRU cache entry operations

Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
Co-authored-by: gordonhu7 <hu.gordon@hotmail.com>
Co-authored-by: Evan Gilman <evan@spirl.com>
Signed-off-by: Neniel <11655196+Neniel@users.noreply.github.com>
@amartinezfayo amartinezfayo added this to the 1.7.2 milestone Jul 31, 2023
Neniel pushed a commit to Neniel/spire that referenced this pull request Aug 24, 2023
…#4335)

* [SPIRE Agent] add telemetry around LRU cache entry operations

Signed-off-by: gordonhu7 <hu.gordon@hotmail.com>
Co-authored-by: gordonhu7 <hu.gordon@hotmail.com>
Co-authored-by: Evan Gilman <evan@spirl.com>
Signed-off-by: Neniel <11655196+Neniel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants