yera.runtime.activity
Construct metadata-only runtime logging events.
Symbols
create_logging_event
create_logging_event(
operation_id: UUID,
actor: LoggingActor,
activity: LoggingActivity,
phase: LoggingPhase,
app_instance: AppInstance,
parent_operation_id: UUID | None = None,
elapsed_seconds: float | None = None,
attributes: LoggingAttributes | None = None,
) → OutputEventConstruct one phase of a metadata-only runtime operation.
The event retains the ordinary output-event shape so it can cross the existing stream, persistence, and replay boundaries. Started operations use chunk zero; terminal phases use chunk one.
Parameters
Stable identity shared by all phases of the operation.
Kind of component performing the operation.
Kind of operation being performed.
Lifecycle phase represented by this event.
App invocation associated with the operation.
Enclosing operation, if any.
Monotonic duration for a terminal phase.
Explicitly reviewed privacy-safe metadata.
Returns
A logging record represented as an ordinary output event.
Raises
If the phase and elapsed duration are inconsistent.
logging_operation
logging_operation(
actor: LoggingActor,
activity: LoggingActivity,
app_instance: AppInstance,
attributes: LoggingAttributes | None = None,
parent_operation_id: UUID | None = None,
) → _LoggingOperationCreate a correlated metadata-only logging operation.
Entering the returned context emits a started record and establishes its
operation ID as the parent of nested activity. Normal exit emits completion;
exceptional exit emits failure; calling cancel() emits cancellation.
Every operation emits at most one terminal record.
Parameters
Kind of component performing the operation.
Kind of operation being performed.
App invocation associated with the operation.
Explicitly reviewed privacy-safe metadata.
Explicit enclosing operation. When omitted, the currently active logging operation becomes the parent.
Returns
An operation context that emits records through the current event stream.