grafana / beyla

eBPF-based autoinstrumentation of web applications and network metrics
https://grafana.com/oss/beyla-ebpf/
Apache License 2.0
1.45k stars 102 forks source link

Provide liveness and readiness probes #542

Open mariomac opened 10 months ago

mariomac commented 10 months ago

Some K8s deployments might require mandatory liveness and readiness probes. We could, only if a user activates it, provide and endpoint that would tell when beyla is live and is ready (e.g. when there is an instrumented executable).

grcevski commented 10 months ago

This is a great idea!

marevers commented 2 months ago

@mariomac I am not sure if this would work, particularly in Daemonset mode. There is a chance that, based on the discovery setting, there is not at least one valid executable on every single node the Daemonset is deployed on, meaning the probes will fail on the nodes without a valid executable.

Therefore, I think 'there is at least 1 instrumented executable' is not the best condition for the probes to succeed.

Maybe a better way would be to check the status of the HTTP server serving the metrics?

mariomac commented 2 months ago

@marevers yeah, that's a good point. Probably now that Beyla is able to instrument multiple executables, we need to change this approach.