* crates/obs (leleka-obs, std only): one event per line (JSON under `leleka run`, key=value on a terminal, the lab's plain lines when a binary is started by hand into a file), UTC ms timestamp, level, component, event, flat fields; prompt/completion text and credentials never appear (key classes + value scrub + registered secrets), per-event token buckets with a `suppressed` count, value and line caps, histogram with Prometheus exposition, size-capped file sink for requests.log. * control-plane: `observe` middleware gives every generation request an id (x-leleka-request-id header) and a session tag (hash of the client's session header); the worker marks engine start / first token / terminal / error on it and one record is written at request end (tokens, cached prefix, queue wait, TTFT, prefill/decode tok/s, finish, error class, engine restart, GPU clock/temp/throttle). All elog! lines go through the log layer (sampled per call site). /metrics?format=prometheus gains request counters and histograms, engine lost/attached counters, uptime and supervisor restarts, PCIe, memory clock, throttle reasons, speculative tokens per round, expert-tier entries by tier and hit ratio. * engine: one structured line per request with the same id (rounds, tokens per round, expert-tier share served from VRAM/PCIe/CPU for that request); telemetry gains spec / expert_tier / last_request; NVML sampler reads PCIe throughput, memory clock, throttle reasons. * supervisor: structured events (engine exit, health, restarts), secrets registered with the log layer, children get LELEKA_REQUEST_LOG, LELEKA_STATUS_FILE, LELEKA_PROFILE and JSON logging; runtime-client and gateway log connect/probe failures as sampled events. * leleka logs (--tail/--since/--level/--component/--source/--request/--follow), leleka report (sanitized support bundle, written only with --yes, nothing sent anywhere), request statistics in leleka status / verify --quick. * generation, sampling and kernels are untouched; the lab scripts keep their plain lines (LELEKA_LOG_FORMAT=legacy or a hand-started binary). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
30 lines
941 B
TOML
30 lines
941 B
TOML
[package]
|
|
name = "leleka-runtime-client"
|
|
version = "0.1.0"
|
|
description = "Client side of the leleka.runtime.v1 gRPC contract: wire messages, validated client, and a Backend that attaches to a running leleka-inference"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[dependencies]
|
|
leleka-backend-api = { path = "../backend-api" }
|
|
leleka-obs = { path = "../obs" }
|
|
prost = "0.14"
|
|
tokio = { version = "1", features = ["rt", "time", "sync", "net"] }
|
|
tonic = "0.14.6"
|
|
tonic-prost = "0.14.6"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
[build-dependencies]
|
|
protoc-bin-vendored = "3"
|
|
tonic-prost-build = "0.14.6"
|
|
|
|
[dev-dependencies]
|
|
futures-util = "0.3"
|
|
leleka-backend-api = { path = "../backend-api", features = ["scripted"] }
|
|
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "time", "sync", "net"] }
|
|
tokio-stream = { version = "0.1", features = ["net", "sync"] }
|
|
|
|
[lints]
|
|
workspace = true
|