/health.
HTTP health
Use/livez to check that the health service responds. Use /readyz to check that the engine can accept inference requests. In the model image, the engine serves both endpoints on port 8080:
ok when the engine is ready. It returns HTTP 503 during loading, quiet mode (after the engine receives SIGUSR2), or drain. Liveness can succeed while readiness fails. Use readiness to route traffic and liveness to decide on restarts, so a slow model load doesn’t trigger a restart.
gRPC health
On port7463, the engine serves the standard grpc.health.v1.Health/Check and Watch methods. Check overall readiness with the empty service name, "". Send traffic when the result is SERVING and withdraw it when the result is NOT_SERVING.
Install grpcurl and place the standard health schema at ./rime-protos/grpc/health/v1/health.proto. This command checks readiness on the private local listener:
OpenTelemetry metrics
The Rime engine exposes these metrics:rime.engine.active_inference_requestrime.engine.inference_concurrency_capacityrime.engine.application_utilizationrime.engine.inference_admission_rejectedrime.engine.concurrent_pipelinerime.engine.generated_audio_durationrime.engine.gpu_loadrime.engine.initial_latencyrime.engine.invocation_requestrime.engine.unicode_scalar_value_countrime.engine.stage.items_inrime.engine.stage.items_outrime.engine.stage.first_output_latency
rime.engine.stage.* series carry a stage attribute.
Set OTEL_COLLECTOR_PROTOCOL to grpc (recommended), http/protobuf, or http/json, and set OTEL_COLLECTOR_ENDPOINT to your collector endpoint:
OTEL_RESOURCE_ATTRIBUTES to add them. The model also does not implement OpenTelemetry authentication, so run a collector sidecar when the upstream endpoint requires credentials.
To expose the OpenTelemetry series for Prometheus, follow the Prometheus integration guide.
Logs
The model container writes one plain-text line per event to its standard output. Request text is not included by default: lines that describe a request carrytext_chars, the length of the input, instead of the input itself.
Set RIME_LOG_REQUEST_TEXT=true to include request text in those lines. Do this only where the container log stays inside a boundary that may hold end-user text, because anything reading the log, including a log forwarder, receives the text verbatim.
OTEL_LOGS_EXPORTER=otlp to have the model also send every log line to the collector named by OTEL_COLLECTOR_ENDPOINT, over OTEL_COLLECTOR_PROTOCOL. Both variables must be set as for metrics, or the switch exports nothing. The model sends each line as one OTLP log record: the line is the body, the log level is the severity, and request_id is an attribute on lines that belong to a request. The model sends logs nowhere else, and never to Rime.
OTEL_LOGS_EXPORTER unset to keep logs on standard output only. The collector endpoint then carries metrics alone.
Histogram tuning
Metrics that emit histogram data use preconfigured bucket boundaries. Override them with the correspondingHISTOGRAM_BUCKETS_* environment variable. Add a separate suffix with HISTOGRAM_SUFFIX_* when you need to distinguish differently tuned series.
Initial latency
rime.engine.initial_latency is measured in milliseconds.
Default bounds:
rime.engine.initial_latency.tuned_120ms.
Generated audio duration
rime.engine.generated_audio_duration is measured in seconds.
Default bounds:
rime.engine.generated_audio_duration.tuned_3s.
