pub struct LogsArtifactsContainer {
    pub identity: Arc<ComponentIdentity>,
    pub stats: Arc<LogStreamStats>,
    pub event_timestamp: Time,
    /* private fields */
}

Fields§

§identity: Arc<ComponentIdentity>

The source of logs in this container.

§stats: Arc<LogStreamStats>

Inspect instrumentation.

§event_timestamp: Time

The time when the container was created by the logging framework.

Implementations§

source§

impl LogsArtifactsContainer

source

pub fn new<'a>( identity: Arc<ComponentIdentity>, interest_selectors: impl Iterator<Item = &'a LogInterestSelector>, parent_node: &Node, budget: BudgetHandle ) -> Self

source

pub fn cursor( &self, mode: StreamMode, parent_trace_id: Id ) -> PinStream<Arc<LogsData>>

Returns a stream of this component’s log messages.

§Rolled out logs

When messages are evicted from our internal buffers before a client can read them, they are counted as rolled out messages which gets appended to the metadata of the next message. If there is no next message, there is no way to know how many messages were rolled out.

source

pub fn handle_log_sink( self: &Arc<Self>, stream: LogSinkRequestStream, sender: UnboundedSender<Task<()>> )

Handle LogSink protocol on stream. Each socket received from the LogSink client is drained by a Task which is sent on sender. The Tasks do not complete until their sockets have been closed.

source

pub async fn drain_messages<E>(self: Arc<Self>, log_stream: LogMessageSocket<E>)
where E: Encoding + Unpin,

Drain a LogMessageSocket which wraps a socket from a component generating logs.

source

pub fn ingest_message(&self, message: GenericStoredMessage)

Updates log stats in inspect and push the message onto the container’s buffer.

source

pub fn update_interest<'a>( &self, interest_selectors: impl Iterator<Item = &'a LogInterestSelector>, previous_selectors: &[LogInterestSelector] )

Set the Interest for this component, notifying all active LogSink/WaitForInterestChange hanging gets with the new interset if it is a change from the previous interest. For any match that is also contained in previous_selectors, the previous values will be removed from the set of interests.

source

pub fn reset_interest(&self, interest_selectors: &[LogInterestSelector])

Resets the Interest for this component, notifying all active LogSink/WaitForInterestChange hanging gets with the lowest interest found in the set of requested interests for all control handles.

source

pub fn pop(&self) -> Option<Arc<GenericStoredMessage>>

Remove the oldest message from this buffer, returning it.

source

pub fn should_retain(&self) -> bool

Returns true if this container corresponds to a running component, still has log messages or still has pending objects to drain.

source

pub fn oldest_timestamp(&self) -> Option<i64>

Returns the timestamp of the earliest log message in this container’s buffer, if any.

source

pub fn terminate(&self)

Stop accepting new messages, ensuring that pending Cursors return Poll::Ready(None) after consuming any messages received before this call.

Trait Implementations§

source§

impl Debug for LogsArtifactsContainer

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _offset: usize, _depth: Depth ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Cast the given object into a dyn std::any::Any.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more