Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions dc/s2n-quic-dc/events/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,36 @@ struct PathSecretMapEntryReplaced<'a> {
previous_credential_id: &'a [u8],
}

#[event("path_secret_map:id_entry_evicted")]
#[subject(endpoint)]
/// Emitted when an entry is evicted due to running out of space
struct PathSecretMapIdEntryEvicted<'a> {
#[nominal_counter("peer_address.protocol")]
peer_address: SocketAddress<'a>,

#[snapshot("[HIDDEN]")]
credential_id: &'a [u8],

/// Time since insertion of this entry
#[measure("age", Duration)]
age: core::time::Duration,
}

#[event("path_secret_map:addr_entry_evicted")]
#[subject(endpoint)]
/// Emitted when an entry is evicted due to running out of space
struct PathSecretMapAddressEntryEvicted<'a> {
#[nominal_counter("peer_address.protocol")]
peer_address: SocketAddress<'a>,

#[snapshot("[HIDDEN]")]
credential_id: &'a [u8],

/// Time since insertion of this entry
#[measure("age", Duration)]
age: core::time::Duration,
}

#[event("path_secret_map:unknown_path_secret_packet_sent")]
#[subject(endpoint)]
/// Emitted when an UnknownPathSecret packet was sent
Expand Down Expand Up @@ -295,6 +325,19 @@ struct PathSecretMapAddressCacheAccessed<'a> {
hit: bool,
}

#[event("path_secret_map:address_cache_accessed_entry")]
#[subject(endpoint)]
/// Emitted when the cache is accessed by peer address successfully
///
/// Provides more information about the accessed entry.
struct PathSecretMapAddressCacheAccessedHit<'a> {
#[nominal_counter("peer_address.protocol")]
peer_address: SocketAddress<'a>,

#[measure("age", Duration)]
age: core::time::Duration,
}

#[event("path_secret_map:id_cache_accessed")]
#[subject(endpoint)]
/// Emitted when the cache is accessed by path secret ID
Expand All @@ -308,6 +351,19 @@ struct PathSecretMapIdCacheAccessed<'a> {
hit: bool,
}

#[event("path_secret_map:id_cache_accessed_entry")]
#[subject(endpoint)]
/// Emitted when the cache is accessed by path secret ID successfully
///
/// Provides more information about the accessed entry.
struct PathSecretMapIdCacheAccessedHit<'a> {
#[snapshot("[HIDDEN]")]
credential_id: &'a [u8],

#[measure("age", Duration)]
age: core::time::Duration,
}

#[event("path_secret_map:cleaner_cycled")]
#[subject(endpoint)]
/// Emitted when the cleaner task performed a single cycle
Expand All @@ -322,6 +378,14 @@ struct PathSecretMapCleanerCycled {
#[measure("entries.id.retired")]
id_entries_retired: usize,

/// Count of entries accessed since the last cycle
#[measure("entries.id.active")]
id_entries_active: usize,

/// The utilization percentage of the active number of entries after the cycle
#[measure("entries.id.active.utilization", Percent)]
id_entries_active_utilization: f32,

/// The utilization percentage of the available number of entries after the cycle
#[measure("entries.id.utilization", Percent)]
id_entries_utilization: f32,
Expand All @@ -334,6 +398,14 @@ struct PathSecretMapCleanerCycled {
#[measure("entries.address")]
address_entries: usize,

/// Count of entries accessed since the last cycle
#[measure("entries.address.active")]
address_entries_active: usize,

/// The utilization percentage of the active number of entries after the cycle
#[measure("entries.address.active.utilization", Percent)]
address_entries_active_utilization: f32,

/// The number of SocketAddress entries that were retired in the cycle
#[measure("entries.address.retired")]
address_entries_retired: usize,
Expand Down
Loading
Loading