Open blakerouse opened 1 month ago
Pinging code owners:
extension/healthcheckv2: @jpkrohling @mwear
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I would be interested in working on this once an agreement is made on the design and if this is something that is wanted.
cc @mwear
Component(s)
extension/healthcheckv2
Is your feature request related to a problem? Please describe.
Currently the
opampextension
uses the original healthcheckextension and it determines if the collector is healthy by performing an HTTP request to its own process to determine if the collector is health. https://github.com/open-telemetry/opamp-go/blob/ed38d5f4bf930b57e04581919fbfb676aaa5a5af/internal/examples/supervisor/supervisor/supervisor.go#L435This is not great from the standpoint of requiring the healthcheck endpoint to be exposed on the host just to get health of the current process that the
opampextension
is also running in. If you don't want any endpoint exposed thenopampextension
is unable to determine health. It is also very inefficient to determine status as it requires the a HTTP connection from its own process to the same process to just get status information. Another possible issue is IP table rules that prevent localhost port access prevent the ability to get this information (rare, but I have see it happen). It would be much better if this could be done in process.It would be better if an extension could access the
healthcheckv2extension
internalstatus.Aggregator
so it can determine the status of the collector without having to perform HTTP/GRPC requests and expose an endpoint on the host.Describe the solution you'd like
It would be great if something like the following could be done from inside another extension to access the aggregator:
Another option would just to expose
AggregateStatus
andSubscribe
directly on thehealthcheckv2extension
through an interface without exposing the entire function interface to the caller becauseRecordStatus
should not really be called externally.Describe alternatives you've considered
Another alternative would allow an extension to register a sub-component inside of the
healthcheckv2extension
. This would allow another extension to expose a different way of getting the health check information versus only HTTP and/or GRPC. This could be done using the same approach:Downside of this approach is if the extension sets the
healthcheckv2extension
as aDependent()
then it will already be started (I believe) beforeStart(...)
is called on the extension. TheAddComponent
function would then need to start the sub-component at the time of registering. I also believe this will require exposing more internal interfaces and types to extensions that might not be desired.Additional context
No response