pub struct RuntimeExecutionObservationScope { /* private fields */ }Expand description
Cloneable identity and recording capability for descendants of one plan execution. It deliberately has no seal authority.
Implementations§
Source§impl RuntimeExecutionObservationScope
impl RuntimeExecutionObservationScope
Sourcepub const fn observation(&self) -> &RuntimeObservationHandle
pub const fn observation(&self) -> &RuntimeObservationHandle
Returns worker recording access.
Sourcepub const fn plan_execution_id(&self) -> &PlanExecutionId
pub const fn plan_execution_id(&self) -> &PlanExecutionId
Returns the plan invocation identity.
Sourcepub const fn plan_span_id(&self) -> RuntimeSpanId
pub const fn plan_span_id(&self) -> RuntimeSpanId
Returns the parent span for task attempts.
Sourcepub fn for_metrics(
observation: RuntimeObservationHandle,
metrics: MetricsRecorder,
) -> Self
pub fn for_metrics( observation: RuntimeObservationHandle, metrics: MetricsRecorder, ) -> Self
A scope on observation whose metrics go to metrics, for driving
plan stages outside a plan-execution lifecycle.
Sourcepub const fn metrics(&self) -> &MetricsRecorder
pub const fn metrics(&self) -> &MetricsRecorder
Where this plan execution’s metrics are reduced.
Sourcepub fn with_metrics(self, metrics: MetricsRecorder) -> Self
pub fn with_metrics(self, metrics: MetricsRecorder) -> Self
Reports this plan execution’s metrics to metrics, and the trace session
does not receive them. Use this for an execution whose metrics owner is
bound separately.
Sourcepub fn record_source_read(&self, fact: SourceReadFact)
pub fn record_source_read(&self, fact: SourceReadFact)
Folds one source-read fact into this plan execution’s exact totals.
Sourcepub fn record_source_read_row(&self, row: SourceReadRuntimeMetrics)
pub fn record_source_read_row(&self, row: SourceReadRuntimeMetrics)
Offers one source-read detail row for this plan execution’s bounded retention.
Sourcepub fn metrics_checkpoint(&self) -> Option<QueryMetricsCheckpoint>
pub fn metrics_checkpoint(&self) -> Option<QueryMetricsCheckpoint>
Returns one internally consistent view of this plan execution’s metrics.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeExecutionObservationScope
impl !UnwindSafe for RuntimeExecutionObservationScope
impl Freeze for RuntimeExecutionObservationScope
impl Send for RuntimeExecutionObservationScope
impl Sync for RuntimeExecutionObservationScope
impl Unpin for RuntimeExecutionObservationScope
impl UnsafeUnpin for RuntimeExecutionObservationScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more