From dca1f2f6487080ee509e77b6961f84380c7d609c Mon Sep 17 00:00:00 2001 From: Adil Hafeez Date: Tue, 12 Nov 2024 09:56:50 -0800 Subject: [PATCH] wip --- crates/common/src/tracing.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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)]