-
Notifications
You must be signed in to change notification settings - Fork 0
Operations and Observability
Pt edited this page Jun 17, 2026
·
1 revision
This page covers how to operate Lc inside long-running services and critical toolchains.
Use:
ProcessStringWithCtxProcessBytesWithCtx
Propagate context from:
- API requests,
- worker jobs,
- shutdown signals.
This allows deterministic cancellation and timeout behavior.
core.Logger provides:
- structured status/time/message formatting,
- status-specific format overrides,
- in-memory log buffer retrieval.
Default runtime also emits call-event start/end debug logs through event hooks.
Attach event handlers for:
- latency metrics,
- error counters,
- audit records,
- trace annotations.
Because event flow is centralized, instrumentation remains consistent across commands.
Recommended rules:
- reserve key namespaces,
- avoid ambiguous key names,
- keep value types stable,
- validate required keys at boundaries.
- event errors abort processing,
- context cancellation aborts call loops,
- unknown String commands are skipped by default dispatch,
- Byte dispatch requires consistent opcode/autoshift registration.
Define integration-layer policy (strict fail / warn / collect metrics) for each case.