pub enum Event {
InstallOrUpgrade {
kind: InstallKind,
previous_version: Option<String>,
},
SessionStart {
source: SessionSource,
},
SessionEnd {
duration_bucket: DurationBucket,
exit_class: ExitClass,
cold_start_bucket: Option<ColdStartBucket>,
providers: Vec<String>,
counters: Counters,
errors: Errors,
turn_wall: TurnWall,
},
Panic {
site: String,
},
}Expand description
One telemetry event.
The tag is the event key, so the wire form is flat and the variant set is
closed.
Variants§
InstallOrUpgrade
This binary’s version differs from the one last recorded on this machine.
Fields
kind: InstallKindInstall, upgrade, or downgrade.
SessionStart
A session began.
Fields
source: SessionSourceHow it was started.
SessionEnd
A session ended. Everything the session accumulated ships here, once.
Fields
duration_bucket: DurationBucketBucketed wall-clock session length.
cold_start_bucket: Option<ColdStartBucket>Bucketed cold start. null on surfaces that do not measure it.
Panic
The process panicked.
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_bounded(&self) -> bool
pub fn is_bounded(&self) -> bool
Whether every string this event carries is inside its declared bound.
The bounds above are enforced by the constructors — Counters is a
struct of u32s, providers comes from ProviderKind::as_str(), and
site comes from crate::reduce_panic_site. That holds only for an
event this process built. Events are also read back from
buffer.jsonl and deserialized before a batch is assembled, and
serde will happily fill site, previous_version, and providers
with any string the file contains. Anything running as this user can
append a line to that file — including a Bash tool call this session
made on the model’s behalf — so the drain path must re-establish the
bound rather than inherit it.
Failing this check drops the event. It is never sanitized: a payload that the schema cannot account for is not made safe by editing it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.