-
Notifications
You must be signed in to change notification settings - Fork 0
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
Simplify interpretation of produced metrics #23
base: main
Are you sure you want to change the base?
Conversation
* Add pre-computed phase durations * Introduce JSON specs for metric output
28ba3e6
to
d3d39b6
Compare
@@ -46,32 +50,68 @@ func (cs containerStatistic) logger() zerolog.Logger { | |||
Logger() | |||
} | |||
|
|||
func (cs containerStatistic) appendInitFields(event *zerolog.Event) { | |||
if !cs.runningTimestamp.IsZero() && cs.previous != nil && !cs.previous.readyTimestamp.IsZero() { |
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.
cs.runningTimeStamp
is always != nil ?
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.
yeah, it's a time.Time
not a pointer to time.Time
so it's the time.Time
zero value until set, which is—I believe—the unix epoch.
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.
So yes technically this code won't work before 1970
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.
(it was a joke, happy to see that someone read my comment 😀 )
// Instead, readiness represents the time an init container has excited successfully,allowing the following containers | ||
// to proceed. |
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.
// Instead, readiness represents the time an init container has excited successfully,allowing the following containers | |
// to proceed. | |
// Instead, readiness represents the time until an init container has exited successfully, allowing the following | |
// containers to proceed. |
writer http.ResponseWriter, | ||
req *http.Request, | ||
) { | ||
startTime := time.Now() | ||
logger := c.logger() | ||
|
||
responseLogger := &responseLogger{responseWriter: writer} | ||
responseLogger := &httpResponseLogger{responseWriter: writer} |
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.
In the context of ServeHTTP method, an http prefix can be skipped IMHO
17b189d
to
d5b7db4
Compare
TODO:
partial: true/false
attribute and emit this with true only once when the pod becomes ready or is deleted before it becomes ready. This will allow aggregations based on the data to avoid having duplicate partial datapoints resulting in skewed distributions depending on how many events were received before the "final state" was achieved. This may be better to do in a different PR.