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; timeouts and broken connections raise their RestClient exceptions. 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.
36 37 38 |
# File 'lib/nonnative/observability.rb', line 36 def health(opts = {}) get("#{name}/healthz", opts) end |
#liveness(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/livez.
44 45 46 |
# File 'lib/nonnative/observability.rb', line 44 def liveness(opts = {}) get("#{name}/livez", opts) end |
#metrics(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/metrics.
60 61 62 |
# File 'lib/nonnative/observability.rb', line 60 def metrics(opts = {}) get("#{name}/metrics", opts) end |
#readiness(opts = {}) ⇒ RestClient::Response, String
Calls /<name>/readyz.
52 53 54 |
# File 'lib/nonnative/observability.rb', line 52 def readiness(opts = {}) get("#{name}/readyz", opts) end |