From c0a640785398c17001cc393f9b1ab4046ac4434c Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Tue, 11 Jan 2022 14:18:34 +0100 Subject: [PATCH] extra is data --- sentry-core/src/performance.rs | 2 +- sentry-types/src/protocol/v7.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sentry-core/src/performance.rs b/sentry-core/src/performance.rs index 08b051fb..9db4a66a 100644 --- a/sentry-core/src/performance.rs +++ b/sentry-core/src/performance.rs @@ -283,7 +283,7 @@ impl Transaction { pub fn set_data(&self, key: &str, value: protocol::Value) { let mut inner = self.inner.lock().unwrap(); if let Some(transaction) = inner.transaction.as_mut() { - transaction.extra.insert(key.into(), value); + transaction.data.insert(key.into(), value); } } diff --git a/sentry-types/src/protocol/v7.rs b/sentry-types/src/protocol/v7.rs index 8f52cf4f..10ebae9c 100644 --- a/sentry-types/src/protocol/v7.rs +++ b/sentry-types/src/protocol/v7.rs @@ -1832,7 +1832,7 @@ pub struct Transaction<'a> { pub tags: Map, /// Optional extra information to be sent with the event. #[serde(default, skip_serializing_if = "Map::is_empty")] - pub extra: Map, + pub data: Map, /// SDK metadata #[serde(default, skip_serializing_if = "Option::is_none")] pub sdk: Option>, @@ -1861,7 +1861,7 @@ impl<'a> Default for Transaction<'a> { event_id: event::default_id(), name: Default::default(), tags: Default::default(), - extra: Default::default(), + data: Default::default(), release: Default::default(), environment: Default::default(), sdk: Default::default(), @@ -1886,7 +1886,7 @@ impl<'a> Transaction<'a> { event_id: self.event_id, name: self.name, tags: self.tags, - extra: self.extra, + data: self.data, release: self.release.map(|x| Cow::Owned(x.into_owned())), environment: self.environment.map(|x| Cow::Owned(x.into_owned())), sdk: self.sdk.map(|x| Cow::Owned(x.into_owned())),