pub struct LogsArtifactsContainer {
pub identity: Arc<ComponentIdentity>,
pub stats: Arc<LogStreamStats>,
/* private fields */
}
Fields§
§identity: Arc<ComponentIdentity>
The source of logs in this container.
stats: Arc<LogStreamStats>
Inspect instrumentation.
Implementations§
Source§impl LogsArtifactsContainer
impl LogsArtifactsContainer
pub fn new<'a>( identity: Arc<ComponentIdentity>, interest_selectors: impl Iterator<Item = &'a LogInterestSelector>, initial_interest: Option<FidlSeverity>, stats: Arc<LogStreamStats>, buffer: ContainerBuffer, on_inactive: Option<OnInactive>, ) -> Self
Sourcepub fn cursor_raw(&self, mode: StreamMode) -> PinStream<CursorItem>
pub fn cursor_raw(&self, mode: StreamMode) -> PinStream<CursorItem>
Returns a stream of this component’s log messages. These are the raw messages in FXT format.
§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.
Sourcepub fn cursor(
&self,
mode: StreamMode,
parent_trace_id: Id,
) -> PinStream<Arc<LogsData>>
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.
Sourcepub fn handle_log_sink(
self: &Arc<Self>,
stream: LogSinkRequestStream,
scope: ScopeHandle,
)
pub fn handle_log_sink( self: &Arc<Self>, stream: LogSinkRequestStream, scope: ScopeHandle, )
Handle LogSink
protocol on stream
. Each socket received from the LogSink
client is
drained by a Task
which is sent on sender
. The Task
s do not complete until their
sockets have been closed.
Sourcepub async fn drain_messages<E>(self: Arc<Self>, log_stream: LogMessageSocket<E>)
pub async fn drain_messages<E>(self: Arc<Self>, log_stream: LogMessageSocket<E>)
Drain a LogMessageSocket
which wraps a socket from a component
generating logs.
Sourcepub fn ingest_message(&self, message: StoredMessage)
pub fn ingest_message(&self, message: StoredMessage)
Updates log stats in inspect and push the message onto the container’s buffer.
Sourcepub fn update_interest<'a>(
&self,
interest_selectors: impl Iterator<Item = &'a LogInterestSelector>,
previous_selectors: &[LogInterestSelector],
)
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.
Sourcepub fn reset_interest(&self, interest_selectors: &[LogInterestSelector])
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.