Class: Nonnative::Observability
- Inherits:
-
HTTPClient
- Object
- HTTPClient
- Nonnative::Observability
- Defined in:
- lib/nonnative/observability.rb
Overview
HTTP client for common observability endpoints exposed by the system under test.
This client is returned by observability and builds endpoint paths from Configuration#name.
Endpoints:
/<name>/healthz/<name>/livez/<name>/readyz/<name>/metrics
Requests are performed using HTTPClient, so callers may pass RestClient options
such as headers, open_timeout, and read_timeout. HTTP error statuses are returned as response
objects; broken connections raise their RestClient exceptions, and a timeout raises either a
RestClient timeout exception or Timeout::Error (the latter when read_timeout bounds a Net::HTTP
retry of an idempotent verb). Requests are not retried automatically.
Instance Method Summary collapse
-
#health(opts = {}) ⇒ RestClient::Response, String
Calls
/<name>/healthz. -
#liveness(opts = {}) ⇒ RestClient::Response, String
Calls
/<name>/livez. -
#metrics(opts = {}) ⇒ RestClient::Response, String
Calls
/<name>/metrics. -
#readiness(opts = {}) ⇒ RestClient::Response, String
Calls
/<name>/readyz.
Instance Method Details
#health(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/healthz.
37 38 39 |
# File 'lib/nonnative/observability.rb', line 37 def health(opts = {}) get("#{name}/healthz", opts) end |
#liveness(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/livez.
45 46 47 |
# File 'lib/nonnative/observability.rb', line 45 def liveness(opts = {}) get("#{name}/livez", opts) end |
#metrics(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/metrics.
61 62 63 |
# File 'lib/nonnative/observability.rb', line 61 def metrics(opts = {}) get("#{name}/metrics", opts) end |
#readiness(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/readyz.
53 54 55 |
# File 'lib/nonnative/observability.rb', line 53 def readiness(opts = {}) get("#{name}/readyz", opts) end |