Skip to content

Commit

Permalink
extra is data
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jan 11, 2022
1 parent 9397197 commit c0a6407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sentry-core/src/performance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
6 changes: 3 additions & 3 deletions sentry-types/src/protocol/v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ pub struct Transaction<'a> {
pub tags: Map<String, String>,
/// Optional extra information to be sent with the event.
#[serde(default, skip_serializing_if = "Map::is_empty")]
pub extra: Map<String, Value>,
pub data: Map<String, Value>,
/// SDK metadata
#[serde(default, skip_serializing_if = "Option::is_none")]
pub sdk: Option<Cow<'a, ClientSdkInfo>>,
Expand Down Expand Up @@ -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(),
Expand All @@ -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())),
Expand Down

0 comments on commit c0a6407

Please sign in to comment.