-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
There was a problem hiding this 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
api/actions/process_stats.go
Outdated
type PodStatsRecord struct { | ||
ProcessGUID string | ||
ProcessType string | ||
// TODO: remove, this is the "instance_id" tag from the gauge envelope |
There was a problem hiding this comment.
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
api/actions/process_stats.go
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO not needed
04a3d30
to
63638e0
Compare
63638e0
to
4fb9888
Compare
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]>
4fb9888
to
8fd5e0b
Compare
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]>
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