Expand description
Logging/tracing init: always-on console output, optional OTLP export.
Host processes (e.g. rship-control-plane) call init_from_env once at
startup — before CellServer::builder()...build() — replacing the
env_logger::init() call from before the log→tracing migration. See
README.md’s Environment table for MYKO_TRACING_ENDPOINT /
MYKO_MEM_PROFILE_INTERVAL_SECS.
Structs§
- Telemetry
Guard - Holds the OTLP provider handles alive for the process lifetime.
Functions§
- init_
from_ env - Initialize logging/tracing from environment — the simple-case wrapper
around
otel_layer_from_envfor host processes that don’t already compose their owntracing_subscriber(no existing fmt layer, no Tracy/ other tracing consumer to combine with — seeotel_layer_from_envif you do). - otel_
layer_ from_ env - Build just the OTLP trace layer (+ register the OTLP metrics
MeterProviderglobally, as a side effect) fromMYKO_TRACING_ENDPOINT/MYKO_MEM_PROFILE_INTERVAL_SECS— for host processes that compose their owntracing_subscriber::registry()(an existing custom fmt layer, a Tracy layer for live profiling sessions, etc.) instead of ceding the whole subscriber toinit_from_env’s monolithic.init(). - register_
item_ count_ gauge - Registers an OTLP
ObservableGaugereporting live per-entity-type item counts (myko.store.item_count, taggedentity_type) — the Rust equivalent of the old TS gateway’sitemCountsGuage/repo.getItemCount(). - start_
malloc_ trim_ probe - Periodic
malloc_trim(0)probe: logs RSS before/after asking glibc to return free arena pages to the OS. Opt-in viaMYKO_MALLOC_TRIM_INTERVAL_SECS(seconds); unset or 0 = disabled, no thread spawned.