Skip to main content

Crate mira

Crate mira 

Source
Expand description

Mira: OTLP in, immutable Arrow blocks out, one binary.

ModulesΒ§

alert πŸ”’
Static-rule alerting: a KYAML document in, webhooks out.
api πŸ”’
The query API.
config πŸ”’
Deployment configuration: KYAML with OmegaConf-style interpolation.
json πŸ”’
OTLP/HTTP with a JSON body.
mcp πŸ”’
MCP, on the same port as everything else.
pipeline πŸ”’
The ingest path.
receiver πŸ”’
OTLP receivers.
telemetry πŸ”’
Mira storing Mira’s telemetry, in Mira.
term πŸ”’
A terminal, hand-rolled on libc.
tui πŸ”’
The terminal UI.
ui πŸ”’
The UI, compiled into the binary.
update πŸ”’
mira update β€” replace this binary with a release from GitHub.

ConstantsΒ§

DRAIN_GRACE πŸ”’
How long a stop is allowed to take before the process leaves without it.
USAGE πŸ”’

StaticsΒ§

QUERIES πŸ”’
Queries served and what they cost, since start.
QUERY_MAX_NANOS πŸ”’
QUERY_NANOS πŸ”’
START πŸ”’
When the process started, so the counters below have a denominator. Forced in serve_with rather than left to first touch, or β€œuptime” would mean β€œseconds since someone first asked”.

FunctionsΒ§

check_source πŸ”’
The guards serve_with runs, for a mira mira --data-dir that maps exactly the same blocks with no server in front of it.
drain πŸ”’
Stop accepting, then let everything already in flight land.
first_stopped πŸ”’
Resolve as soon as any one flusher has returned.
health πŸ”’
Liveness, plus what the ingest path has refused so far.
json_ok πŸ”’
load πŸ”’
Precedence is flag > file > default. Hand-rolled: the flag set exists only to override the file, so a parser crate would be more code than the thing it parses.
load_from πŸ”’
load without the two flags that end the process, so it can be called.
main πŸ”’
ops_router πŸ”’
The three endpoints that answer for the process rather than for the data: liveness, readiness, and everything this node counts about itself.
peak_rss πŸ”’
High-water mark of this process’s resident set, in bytes.
ready πŸ”’
Readiness is one question: can this instance accept an export and make it durable? Everything else about the process is /health’s.
readyz πŸ”’
Readiness: 200 while exports can be made durable, 503 once they cannot.
replay πŸ”’
Push everything the log holds that no block claims back through the flushers, before the listeners open.
run πŸ”’
serve πŸ”’
serve_with πŸ”’
The server proper, with its stop edge passed in rather than taken from the process. A test can hold that edge; nothing else needs to.
shutdown πŸ”’
Resolve on the first stop signal.
stats πŸ”’
Everything this node knows about itself, in one document.
timed πŸ”’
Wrapped around the query router only, so OTLP writes and UI asset fetches do not land in the read latency an operator is reading.
tui_source πŸ”’
Where a mira mira invocation should read from.