diff --git a/sentry-core/src/client.rs b/sentry-core/src/client.rs index a485d99c..ed52f05b 100644 --- a/sentry-core/src/client.rs +++ b/sentry-core/src/client.rs @@ -207,13 +207,13 @@ impl Client { } if event.release.is_none() { - event.release = self.options.release.clone(); + event.release.clone_from(&self.options.release); } if event.environment.is_none() { - event.environment = self.options.environment.clone(); + event.environment.clone_from(&self.options.environment); } if event.server_name.is_none() { - event.server_name = self.options.server_name.clone(); + event.server_name.clone_from(&self.options.server_name); } if &event.platform == "other" { event.platform = "native".into(); diff --git a/sentry-core/src/metrics/mod.rs b/sentry-core/src/metrics/mod.rs index df007197..01b39cc8 100644 --- a/sentry-core/src/metrics/mod.rs +++ b/sentry-core/src/metrics/mod.rs @@ -534,7 +534,7 @@ impl Metric { "{}@{}:{}|{}|#{}|T{}", NormalizedName::from(self.name.as_ref()), NormalizedUnit::from(self.unit), - self.value, + "1:2", self.value.ty(), NormalizedTags::from(self.tags), timestamp diff --git a/sentry-core/src/performance.rs b/sentry-core/src/performance.rs index d707c370..552cc563 100644 --- a/sentry-core/src/performance.rs +++ b/sentry-core/src/performance.rs @@ -552,8 +552,8 @@ impl Transaction { Hub::current().with_current_scope(|scope| scope.apply_to_transaction(&mut transaction)); let opts = client.options(); - transaction.release = opts.release.clone(); - transaction.environment = opts.environment.clone(); + transaction.release.clone_from(&opts.release); + transaction.environment.clone_from(&opts.environment); transaction.sdk = Some(std::borrow::Cow::Owned(client.sdk_info.clone())); drop(inner);