Add health endpoint for worker (#2442)

* Return worker process information in the health endpoint.

Experimental:  The worker_info and returned worker_process_info fields are experimental and can change or be removed without notice.

When a user passes in "worker_info=1" or "worker_info=true" and a worker is running the returned json will be returned with a key named "worker_process_info" which value is a json object with information about the worker process.
This commit is contained in:
Todd authored and GitHub committed 2022-09-19 11:24:42 -07:00
1 parent 54b3d36946
commit 06fd086004
19 files changed
+848 -401

No files matched your search

+1 -1
View File
@@ -815,7 +815,7 @@ func (c *Command) Run(args []string) int {
return base.CommandCliError
}
opsServer, err := ops.NewServer(c.Logger, c.controller, c.Listeners...)
opsServer, err := ops.NewServer(c.Logger, c.controller, c.worker, c.Listeners...)
if err != nil {
c.UI.Error(fmt.Errorf("Failed to start ops listeners: %w", err).Error())
return base.CommandCliError