-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[component] Status Aggregation in Core #10058
Comments
Yes this seems totally valid. As part of manually handling the permanent error a graceful shutdown could occur, and that transition should be recorded. |
One argument for leaving it in core is to try to help components aggregate statuses in a consistent manner so that the meaning of a |
Once we are happy with the aggregation for the health check extension, I think we can and should promote it to core, or some other shared library. We may have been over zealous in starting with it in core, but the intent was as you point out, to help aggregate status consistently between consumers. |
#### Description Adds an RFC for component status reporting. The main goal is to define what component status reporting is, our current, implementation, and how such a system interacts with a 1.0 component. When merged, the following issues will be unblocked: - #9823 - #10058 - #9957 - #9324 - #6506 --------- Co-authored-by: Matthew Wear <matthew.wear@gmail.com> Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
With #10413 merged, I am removing this from the component 1.0 milestone and Collector V1 project. |
Adds an RFC for component status reporting. The main goal is to define what component status reporting is, our current, implementation, and how such a system interacts with a 1.0 component. When merged, the following issues will be unblocked: - open-telemetry#9823 - open-telemetry#10058 - open-telemetry#9957 - open-telemetry#9324 - open-telemetry#6506 --------- Co-authored-by: Matthew Wear <matthew.wear@gmail.com> Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
… to Stopping (#10958) #### Description In #10058 I mentioned: > There is a tangentially related issue with PermanentErrors and the underlying finite state machine that governs transitions between statuses. Currently, a PermanentError is a final state. That is, once a component enters this state, no further transitions are allowed. In light of the work I did on the alternative health check extension, I believe we should allow a transition from PermanentError to Stopping to consistently prioritize lifecycle events for components. This transition also make sense from a practical perspective. A component in a PermanentError state is one that has been started and is running, although in a likely degraded state. The collector will call shutdown on the component (when the collector is shutting down) and we should allow the status to reflect that. This PR makes the suggested change and updates the documentation to reflect that. As this is an internal change, I have not included a changelog. Also note, we can close #10058 after this as we've already removed status aggregation from core during the recent component status refactor. <!-- Issue number if applicable --> #### Link to tracking issue Fixes #10058 <!--Describe what testing was performed and which tests were added.--> #### Testing units <!--Describe the documentation added.--> #### Documentation Updated docs/component-status.md and associated diagram. <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Antoine Toulme <atoulme@splunk.com>
… to Stopping (open-telemetry#10958) #### Description In open-telemetry#10058 I mentioned: > There is a tangentially related issue with PermanentErrors and the underlying finite state machine that governs transitions between statuses. Currently, a PermanentError is a final state. That is, once a component enters this state, no further transitions are allowed. In light of the work I did on the alternative health check extension, I believe we should allow a transition from PermanentError to Stopping to consistently prioritize lifecycle events for components. This transition also make sense from a practical perspective. A component in a PermanentError state is one that has been started and is running, although in a likely degraded state. The collector will call shutdown on the component (when the collector is shutting down) and we should allow the status to reflect that. This PR makes the suggested change and updates the documentation to reflect that. As this is an internal change, I have not included a changelog. Also note, we can close open-telemetry#10058 after this as we've already removed status aggregation from core during the recent component status refactor. <!-- Issue number if applicable --> #### Link to tracking issue Fixes open-telemetry#10058 <!--Describe what testing was performed and which tests were added.--> #### Testing units <!--Describe the documentation added.--> #### Documentation Updated docs/component-status.md and associated diagram. <!--Please delete paragraphs that you did not use before submitting.--> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Antoine Toulme <atoulme@splunk.com>
Functions to handle status aggregation were added to core when status reporting was originally implemented. These functions were initially adequate while I was working on an alternative health check extension, but as more requirements surfaced, I had to reimplement alternative logic to handle all of the use cases. This PR specifically introduces the alternative aggregation logic and this PR shows how everything works together.
The goal of status aggregation is to take a collection of status events and combine them into a single event that represents the most relevant status based on the collection as a whole. One assumption we made in the original aggregation logic, was that
PermanentError
s should take precedence overRecoverableError
s. While this still the default aggregation used in the health check extension, users have the option to include or ignore permanent and / or recoverable errors independently. If a user ignoresPermanentError
s, but includesRecoverableError
s, we wantRecoverableError
s to take priority overPermanentError
s during aggregation. In order to handle this is this in the extension, I implemented a function that takes anErrorPriority
and returns a suitable aggregation function.We can divide component statuses into two categories. Lifecycle statuses (eg
Starting
,Stopping
,Stopped
) and runtime statuses (egRecoverableError
,PermanentError
,FatalError
). In the original aggregation logic, error statuses take precedence over lifecycle statuses. In the health check extension I had to change the aggregation logic to give precedence to lifecycle events in order to distinguish between a collector that is starting up or shutting down (a 503 status) or a collector in an error state (a 500).There is a tangentially related issue with
PermanentError
s and the underlying finite state machine that governs transitions between statuses. Currently, aPermanentError
is a final state. That is, once a component enters this state, no further transitions are allowed. In light of the work I did on the alternative health check extension, I believe we should allow a transition fromPermanentError
toStopping
to consistently prioritize lifecycle events for components. This transition also make sense from a practical perspective. A component in aPermanentError
state is one that has been started and is running, although in a likely degraded state. The collector will call shutdown on the component (when the collector is shutting down) and we should allow the status to reflect that.To summarize, the aggregation logic as it exists in core was not usable for the health check extension and needed to be reimplemented. The health check extension needed the ability to prioritize
RecoverableError
s overPermanentError
s in some, but not all cases. It also needed to prioritize lifecycle statuses over runtime statuses. A change that was not made, but should be made, is allowing a component to transition from aPermanentError
state toStopping
(for consistency). As we work towards component 1.0, we should decide if the aggregation logic we have in core should be replaced by what was implemented for the health check extension, leave it as is, or remove it completely.The text was updated successfully, but these errors were encountered: