diff --git a/crates/common/src/tracing.rs b/crates/common/src/tracing.rs index f9422f19..0d2bb978 100644 --- a/crates/common/src/tracing.rs +++ b/crates/common/src/tracing.rs @@ -98,6 +98,15 @@ impl Event { attributes: Vec::new(), } } + + pub fn add_attribute(&mut self, key: String, value: String) { + self.attributes.push(Attribute { + key, + value: AttributeValue { + string_value: Some(value), + }, + }); + } } #[derive(Serialize, Deserialize, Debug)]