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

Add process guid to gauge envelopes #3788

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

uzabanov
Copy link
Contributor

Is there a related GitHub Issue?

#3755

What is this change about?

The log cache api will be used by the process and app handlers, so that they
can fetch stats for a process with a particular guid. Therefore it makes
sense to filter the envelope stream for envelopes for that process guid
only. In order to do so we need to have access to the process guid that
the envelope is related to.

The cloud controller implementation is doing the same: https://github.com/cloudfoundry/cloud_controller_ng/blob/5b1af263bbb21793ba7d49f64c75f6ab5f5ab267/lib/cloud_controller/diego/reporters/instances_stats_reporter.rb#L144

Copy link
Member

@danail-branekov danail-branekov 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, apart from a couple of TODOs you have probably added unintentionally

type PodStatsRecord struct {
ProcessGUID string
ProcessType string
// TODO: remove, this is the "instance_id" tag from the gauge envelope
Copy link
Member

Choose a reason for hiding this comment

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

I guess we do not need those TODOs

ProcessType string
// TODO: remove, this is the "instance_id" tag from the gauge envelope
Index int
// TODO: remove, this is the instance state from the process record
Copy link
Member

Choose a reason for hiding this comment

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

TODO not needed

@georgethebeatle georgethebeatle force-pushed the issues/3752-process-id-in-envelope branch from 04a3d30 to 63638e0 Compare February 11, 2025 13:25
@danail-branekov danail-branekov enabled auto-merge (rebase) February 11, 2025 13:40
@danail-branekov danail-branekov force-pushed the issues/3752-process-id-in-envelope branch from 63638e0 to 4fb9888 Compare February 12, 2025 10:35
The log cache api will be used by the process and app handlers, so that they
can fetch stats for a process with a particular guid. Therefore it makes
sense to filter the envelope stream for envelopes for that process guid
only. In order to do so we need to have access to the process guid that
the envelope is related to.

The cloud controller implementation is doing the same: https://github.com/cloudfoundry/cloud_controller_ng/blob/5b1af263bbb21793ba7d49f64c75f6ab5f5ab267/lib/cloud_controller/diego/reporters/instances_stats_reporter.rb#L144

Co-authored-by: Georgi Sabev <[email protected]>
@danail-branekov danail-branekov force-pushed the issues/3752-process-id-in-envelope branch from 4fb9888 to 8fd5e0b Compare February 12, 2025 13:53
@danail-branekov danail-branekov merged commit 36dc11a into main Feb 12, 2025
10 checks passed
@danail-branekov danail-branekov deleted the issues/3752-process-id-in-envelope branch February 12, 2025 14:30
georgethebeatle added a commit that referenced this pull request Feb 12, 2025
TODO:
- Set raw auth header in AuthInfo middleware
- Add test for InsertOrUpdate helper
- Use the new LogCacheStatsCollector from the process handler
- Rebase on top of #3788

Co-authored-by: Georgi Sabev <[email protected]>
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.

2 participants