[extension/opamp] Implement ReportsHealth capability#35488
Conversation
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
mwear
left a comment
There was a problem hiding this comment.
Is this meant to be a complete implementation of this functionality? The healthcheckv2extension aggregates component status (via the componentstatus.Watcher interface) and produces a nested representation of collector health. See the "verbose example" here. This representation is structurally similar to the ComponentHealth message for OpAMP. I think we can extract the status aggregator from the healthcheckv2 extension, use it in the OpAMP extension, and convert AggregateStatuses into ComponentHealth messages. I believe work to extract the aggregator is underway as part of: #34692.
Thanks for the input @mwear - this implementation is a rudimentary version of the health report to just indicate whether the agent is up or not (i kept the implementation close to how it is implemented in the supervisor). However, when the component health information from the healthcheckv2 extension becomes available to be used here as well using this here makes a lot of sense - I can also leave this PR as a draft for now and then adapt it to populate the component health map once #34692 has been resolved |
|
@bacherfl, if this is helpful as is, we can move forward with it so long as we have an issue describing the end result we want. |
evan-bradley
left a comment
There was a problem hiding this comment.
One request, but I'm fine getting a basic implementation in since it inches us closer to proper health reporting.
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
# Conflicts: # extension/opampextension/go.mod # extension/opampextension/go.sum
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
evan-bradley
left a comment
There was a problem hiding this comment.
Looks good to me as a first pass. The next step will be using status reporting.
# Conflicts: # extension/opampextension/go.mod # extension/opampextension/go.sum
|
I've captured the next step here, which uses component status reporting to improve the health information we report: #35856. |
Description: This PR adds the ReportsHealth capability to the OpAMP extension.
Link to tracking Issue: #35433
Testing: Add unit test to check the configuration being used for the OpAMP client. Also tested manually by running the supervisor and verifying the health messages are received there
Documentation: Describe the new option in the readme