Allow telemetry::event! with no properties (#22190)
CC @josephTLyons Release Notes: - N/A
This commit is contained in:
parent
433cb99170
commit
77abf13f42
5 changed files with 54 additions and 78 deletions
|
@ -17,6 +17,13 @@ pub use telemetry_events::FlexibleEvent as Event;
|
|||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! event {
|
||||
($name:expr) => {{
|
||||
let event = $crate::Event {
|
||||
event_type: $name.to_string(),
|
||||
event_properties: std::collections::HashMap::new(),
|
||||
};
|
||||
$crate::send_event(event);
|
||||
}};
|
||||
($name:expr, $($key:ident $(= $value:expr)?),+ $(,)?) => {{
|
||||
let event = $crate::Event {
|
||||
event_type: $name.to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue