-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
pkg/health/health.go
Outdated
if len(sw.boxes) == 0 || | ||
clock().Sub(sw.boxes[len(sw.boxes)-1].start) >= boxLength { | ||
sw.pushBox() | ||
} | ||
return sw.boxes[len(sw.boxes)-1] |
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.
That's smart !
But does it mean if there is no flows coming for a time (typically hanging at r.format.Next()
) you will not push boxes ?
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.
You are right, but it should not matter since in the stats aggregation we just count the boxes whose start time is less than 5 minutes.
pkg/health/health.go
Outdated
type MetricSet struct { | ||
// ReceivedFlows is the total number of received flows, including both those | ||
// that have been successfully processed and those that haven't | ||
ReceivedFlows uint64 `json:"received_flows"` |
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.
we said dromedary :)
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.
ouch! Actually this struct is not converted to JSON anymore. Removing the json tags
I haven't checked in deep, but does it capture when flows are discarded due to not having the definitions? Maybe it would requires some change directly in goflow, as I'm not sure if we are notified about that at our level. |
@jotak mmm... good point. I was assuming that the goflow library was returning error on that situation. I'll double-check |
@mariomac |
FYI I created https://issues.redhat.com/browse/NETOBSERV-168 as a follow-up, to provide the full status as first intended |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Status report based on Eclipse Microprofile 2.1.
Implements
/health/ready
and/health/live
endpoints, returning something like:It also implements a
/metrics
endpoint to know the exact information about flows processed, templates received, etc...: