Operations
This page covers the server’s health checks and request log. The
installation report the server sends is set under
[usage_report], the span and metric
export under [telemetry], and upgrades and
the support policy are on Releases, upgrades and support.
Health checks
| Route | Token | Answers |
|---|---|---|
GET {base}/health/liveness | none | 200 while the process serves; it checks nothing. |
GET {base}/health/readiness | none | 200 while the server serves and no readiness indicator is down, 503 otherwise, with the family’s readiness document: the state, the phase (booting, serving or draining) and each indicator’s name and state, never why. |
GET {base}/health | none | The status of readiness with the state alone, {"state":"up"}. |
GET {base}/metrics | none | 200 with every metric in the Prometheus text format. |
GET {base}/operator/dependencies | auth.product_scope | 200 with the readiness document and the last outcome of every upstream the server sends to. |
The routes are those of ferrohealth-server over the registry of
ferrohealth-health, the ones every FerroHEALTH product serves. Readiness
answers 503 until the listener is bound and from the moment SIGTERM or
SIGINT arrives, so a load balancer stops sending before the drain. The
open readiness route leaves out why an indicator is down; the dependency
report gives the reason behind the steward scope.
The database indicator is down while no statement reaches PostgreSQL,
the audit_spool indicator is down when less than a tenth of the spool’s
record or byte bound is left, and the audit_outbox indicator is down while
pix.audit_quarantine holds a record the repository refused. The outbox indicator is down while
a due outbound message, an XCPD answer, an ITI-93 message or an ITI-10
notification, has waited past the sender’s lease and two idle wakes, which
a running sender never lets happen; a subscriber or consumer that refuses
its messages leaves the server ready. The dependency report names every
PMIR subscriber and every HL7 v2 consumer, the consumer as mllp:// and its
host:port, with the outcome of its latest message. With the HL7 v2 face on, the hl7v2_listener indicator is down
while the MLLP listener is not accepting. Each check
gets two seconds; one that takes longer counts as down. The dependency
report sits behind the steward scope so an anonymous reader learns no
endpoint. ferropix healthcheck asks the readiness route of the server on
the same host and exits 1 on anything but 200: use it as the container
health check.
The request log
The request log is the one of ferrohealth-telemetry that every
FerroHEALTH product writes: one line per request under the tracing target
ferrohealth_telemetry::request, with these fields:
| Field | What it holds |
|---|---|
request_id | The UUID the server minted for the request. The steward trail of GET {base}/operator/actions carries the same id; a BALP record carries the X-Request-Id of the exchange, the client’s when it sent one. |
client_named | Whether the client sent an X-Request-Id of its own. Its value is echoed on the response and never logged. |
method | The HTTP method, or _OTHER for a method outside the standard set, so a client’s own token never reaches the line. |
route | The matched route template, such as /fhir/Patient/$ihe-pix, or <unmatched>. |
status | The status answered. |
latency_ms | The time to the response, in milliseconds. |
query | The values of the parameters telemetry.logged_query_parameters names; empty by default. |
caller | The token’s client_id, or its subject when it names none, or - when the credential names neither. A request the gate refused has no caller. |
domain | The identifier domains a successful feed wrote to, comma-separated. A request that wrote none has no domain. |
Every request also runs inside a server span named for its method and
route template, such as GET /fhir/Patient/$ihe-pix (the method alone when
no route matched), with an error status on a 5xx, which [telemetry.otlp]
exports. It lands in the http_server_request_duration_seconds histogram
and is counted in http_server_active_requests, the requests in flight by
method and scheme, both of which GET {base}/metrics serves and
[telemetry.otlp] pushes.
A panic writes one error line that names the thread and the source
location and leaves the panic message out, since a message can quote a
patient identifier. When the panicking thread is serving a request, the
line also carries that request’s request_id, so you can find the request
it broke.
The line never holds the path as sent, a query string outside
telemetry.logged_query_parameters, a body or a header value. A PIXm Consumer that calls $ihe-pix by GET puts the patient’s
identifier in the query, and the line still names only the route template.
A proxy in front of the server must keep query strings out of its own logs
for the same reason. The gate of ferrohealth-smart writes its own audit
line per guarded request under the target ferrohealth_smart::audit, with
the same discipline.
Reporting a defect
Open an issue when a transaction answers differently from what its specification names, or identifying data reaches a log line. Never paste patient data or a real identifier. The family’s post-market procedure says how complaints and incidents are handled.