mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-06-05 23:03:48 +00:00
Add /livez endpoint.
This commit is contained in:
@@ -17,6 +17,7 @@ I wanted to monitor the queries and responses of our graphql endpoint. Still, we
|
|||||||
* `:8080/*` - the graphql passthrough endpoint
|
* `:8080/*` - the graphql passthrough endpoint
|
||||||
* `:9393/metrics` - the prometheus metrics endpoint
|
* `:9393/metrics` - the prometheus metrics endpoint
|
||||||
* `:8080/healthz` - the healthcheck endpoint
|
* `:8080/healthz` - the healthcheck endpoint
|
||||||
|
* `:8080/livez` - the liveness probe endpoint
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ func StartHTTPProxy() {
|
|||||||
server.Get("/*", proxyTheRequest)
|
server.Get("/*", proxyTheRequest)
|
||||||
|
|
||||||
server.Get("/healthz", healthCheck)
|
server.Get("/healthz", healthCheck)
|
||||||
|
server.Get("/livez", healthCheck)
|
||||||
|
|
||||||
err := server.Listen(fmt.Sprintf(":%d", cfg.Server.PortGraphQL))
|
err := server.Listen(fmt.Sprintf(":%d", cfg.Server.PortGraphQL))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cfg.Logger.Critical("Can't start the service", map[string]interface{}{"error": err.Error()})
|
cfg.Logger.Critical("Can't start the service", map[string]interface{}{"error": err.Error()})
|
||||||
|
|||||||
Reference in New Issue
Block a user