From 6c717ffd069b42742afd324403f41fbdca813e69 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 15:12:21 -0700 Subject: [PATCH 01/20] init --- .vscode/settings.json | 2 +- relay-base-schema/src/data_category.rs | 6 + relay-base-schema/src/events.rs | 4 + .../src/normalize/mod.rs | 3 + relay-quotas/src/quota.rs | 3 +- relay-server/src/actors/processor.rs | 6 + relay-server/src/actors/store.rs | 5 +- relay-server/src/envelope.rs | 11 +- relay-server/src/utils/rate_limits.rs | 1 + relay-server/src/utils/sizes.rs | 1 + tests/integration/fixtures/__init__.py | 5 + tests/integration/test_feedback.py | 111 ++++++++++++++++++ 12 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 tests/integration/test_feedback.py diff --git a/.vscode/settings.json b/.vscode/settings.json index ddcd1bdb9a6..0d07fce5698 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,7 @@ "editor.formatOnSave": true, "editor.formatOnType": true, "editor.tabSize": 4, - "editor.rulers": [100], + // "editor.rulers": [100], "files.autoSave": "onWindowChange", "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index 60adfd3fc2b..f90526738df 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -57,6 +57,10 @@ pub enum DataCategory { /// but we define it here to prevent clashing values since this data category enumeration /// is also used outside of Relay via the Python package. MonitorSeat = 13, + /// User Feedback + /// + /// Represents a User Feedback processed + UserFeedback = 14, // // IMPORTANT: After adding a new entry to DataCategory, go to the `relay-cabi` subfolder and run // `make header` to regenerate the C-binding. This allows using the data category from Python. @@ -108,6 +112,7 @@ impl DataCategory { Self::Monitor => "monitor", Self::Span => "span", Self::MonitorSeat => "monitor_seat", + Self::UserFeedback => "user_feedback", Self::Unknown => "unknown", } } @@ -157,6 +162,7 @@ impl From for DataCategory { EventType::Csp | EventType::Hpkp | EventType::ExpectCt | EventType::ExpectStaple => { Self::Security } + EventType::UserFeedback => Self::UserFeedback, } } } diff --git a/relay-base-schema/src/events.rs b/relay-base-schema/src/events.rs index 840ed32ef0d..9f5f72101b2 100644 --- a/relay-base-schema/src/events.rs +++ b/relay-base-schema/src/events.rs @@ -41,6 +41,8 @@ pub enum EventType { ExpectStaple, /// Performance monitoring transactions carrying spans. Transaction, + /// User feedback payload. + UserFeedback, /// All events that do not qualify as any other type. #[serde(other)] #[default] @@ -71,6 +73,7 @@ impl FromStr for EventType { "expectct" => EventType::ExpectCt, "expectstaple" => EventType::ExpectStaple, "transaction" => EventType::Transaction, + "user_report_v2" => EventType::UserFeedback, _ => return Err(ParseEventTypeError), }) } @@ -86,6 +89,7 @@ impl fmt::Display for EventType { EventType::ExpectCt => write!(f, "expectct"), EventType::ExpectStaple => write!(f, "expectstaple"), EventType::Transaction => write!(f, "transaction"), + EventType::UserFeedback => write!(f, "user_report_v2"), } } } diff --git a/relay-event-normalization/src/normalize/mod.rs b/relay-event-normalization/src/normalize/mod.rs index bb4eb3516a8..47cacef07ef 100644 --- a/relay-event-normalization/src/normalize/mod.rs +++ b/relay-event-normalization/src/normalize/mod.rs @@ -245,6 +245,9 @@ impl<'a> NormalizeProcessor<'a> { if event.ty.value() == Some(&EventType::Transaction) { return EventType::Transaction; } + if event.ty.value() == Some(&EventType::UserFeedback) { + return EventType::UserFeedback; + } // The SDKs do not describe event types, and we must infer them from available attributes. let has_exceptions = event diff --git a/relay-quotas/src/quota.rs b/relay-quotas/src/quota.rs index f4f9e9b0afa..95b862fa7e8 100644 --- a/relay-quotas/src/quota.rs +++ b/relay-quotas/src/quota.rs @@ -110,7 +110,8 @@ impl CategoryUnit { | DataCategory::TransactionIndexed | DataCategory::Span | DataCategory::MonitorSeat - | DataCategory::Monitor => Some(Self::Count), + | DataCategory::Monitor + | DataCategory::UserFeedback => Some(Self::Count), DataCategory::Attachment => Some(Self::Bytes), DataCategory::Session => Some(Self::Batched), diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index f525cf544bb..f6a6493c5c1 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1638,6 +1638,7 @@ impl EnvelopeProcessorService { ItemType::Security => true, ItemType::FormData => true, ItemType::RawSecurity => true, + ItemType::UserReportV2 => true, // These should be removed conditionally: ItemType::UnrealReport => self.inner.config.processing_enabled(), @@ -1681,6 +1682,8 @@ impl EnvelopeProcessorService { let transaction_item = envelope.take_item_by(|item| item.ty() == &ItemType::Transaction); let security_item = envelope.take_item_by(|item| item.ty() == &ItemType::Security); let raw_security_item = envelope.take_item_by(|item| item.ty() == &ItemType::RawSecurity); + let user_feedback_item = envelope.take_item_by(|item| item.ty() == &ItemType::UserReportV2); + let form_item = envelope.take_item_by(|item| item.ty() == &ItemType::FormData); let attachment_item = envelope .take_item_by(|item| item.attachment_type() == Some(&AttachmentType::EventPayload)); @@ -1712,6 +1715,9 @@ impl EnvelopeProcessorService { // hint to normalization that we're dealing with a transaction now. self.event_from_json_payload(item, Some(EventType::Transaction))? }) + } else if let Some(mut item) = user_feedback_item { + relay_log::trace!("processing user feedback"); + self.event_from_json_payload(item, Some(EventType::UserFeedback))? } else if let Some(mut item) = raw_security_item { relay_log::trace!("processing security report"); sample_rates = item.take_sample_rates(); diff --git a/relay-server/src/actors/store.rs b/relay-server/src/actors/store.rs index f8735a4e6a4..8f85a054232 100644 --- a/relay-server/src/actors/store.rs +++ b/relay-server/src/actors/store.rs @@ -121,7 +121,10 @@ impl StoreService { let event_item = envelope.get_item_by(|item| { matches!( item.ty(), - ItemType::Event | ItemType::Transaction | ItemType::Security + ItemType::Event + | ItemType::Transaction + | ItemType::Security + | ItemType::UserReportV2 ) }); diff --git a/relay-server/src/envelope.rs b/relay-server/src/envelope.rs index acad7f1cb60..911b6c63392 100644 --- a/relay-server/src/envelope.rs +++ b/relay-server/src/envelope.rs @@ -111,6 +111,8 @@ pub enum ItemType { CheckIn, /// A standalone span. Span, + /// UserReport as an Event + UserReportV2, /// A new item type that is yet unknown by this version of Relay. /// /// By default, items of this type are forwarded without modification. Processing Relays and @@ -126,6 +128,7 @@ impl ItemType { match event_type { EventType::Default | EventType::Error => ItemType::Event, EventType::Transaction => ItemType::Transaction, + EventType::UserFeedback => ItemType::UserReportV2, EventType::Csp | EventType::Hpkp | EventType::ExpectCt | EventType::ExpectStaple => { ItemType::Security } @@ -144,6 +147,7 @@ impl fmt::Display for ItemType { Self::RawSecurity => write!(f, "raw_security"), Self::UnrealReport => write!(f, "unreal_report"), Self::UserReport => write!(f, "user_report"), + Self::UserReportV2 => write!(f, "user_report_v2"), Self::Session => write!(f, "session"), Self::Sessions => write!(f, "sessions"), Self::Statsd => write!(f, "statsd"), @@ -172,6 +176,7 @@ impl std::str::FromStr for ItemType { "raw_security" => Self::RawSecurity, "unreal_report" => Self::UnrealReport, "user_report" => Self::UserReport, + "user_report_v2" => Self::UserReportV2, "session" => Self::Session, "sessions" => Self::Sessions, "statsd" => Self::Statsd, @@ -546,6 +551,7 @@ impl Item { ItemType::Statsd | ItemType::MetricBuckets => None, ItemType::FormData => None, ItemType::UserReport => None, + ItemType::UserReportV2 => None, ItemType::Profile => Some(if indexed { DataCategory::ProfileIndexed } else { @@ -678,7 +684,8 @@ impl Item { | ItemType::Transaction | ItemType::Security | ItemType::RawSecurity - | ItemType::UnrealReport => true, + | ItemType::UnrealReport + | ItemType::UserReportV2 => true, // Attachments are only event items if they are crash reports or if they carry partial // event payloads. Plain attachments never create event payloads. @@ -736,6 +743,8 @@ impl Item { ItemType::RawSecurity => true, ItemType::UnrealReport => true, ItemType::UserReport => true, + ItemType::UserReportV2 => true, + ItemType::ReplayEvent => true, ItemType::Session => false, ItemType::Sessions => false, diff --git a/relay-server/src/utils/rate_limits.rs b/relay-server/src/utils/rate_limits.rs index 2f6abf6de2e..82adf5b7045 100644 --- a/relay-server/src/utils/rate_limits.rs +++ b/relay-server/src/utils/rate_limits.rs @@ -94,6 +94,7 @@ fn infer_event_category(item: &Item) -> Option { ItemType::Transaction => Some(DataCategory::Transaction), ItemType::Security | ItemType::RawSecurity => Some(DataCategory::Security), ItemType::UnrealReport => Some(DataCategory::Error), + ItemType::UserReportV2 => Some(DataCategory::UserFeedback), ItemType::Attachment if item.creates_event() => Some(DataCategory::Error), ItemType::Attachment => None, ItemType::Session => None, diff --git a/relay-server/src/utils/sizes.rs b/relay-server/src/utils/sizes.rs index c73fc41f701..11dd5157c6e 100644 --- a/relay-server/src/utils/sizes.rs +++ b/relay-server/src/utils/sizes.rs @@ -29,6 +29,7 @@ pub fn check_envelope_size_limits(config: &Config, envelope: &Envelope) -> bool | ItemType::Security | ItemType::ReplayEvent | ItemType::RawSecurity + | ItemType::UserReportV2 | ItemType::FormData => { event_size += item.len(); } diff --git a/tests/integration/fixtures/__init__.py b/tests/integration/fixtures/__init__.py index 95e7fbfdca2..342e78200a0 100644 --- a/tests/integration/fixtures/__init__.py +++ b/tests/integration/fixtures/__init__.py @@ -220,6 +220,11 @@ def send_client_report(self, project_id, payload): envelope.add_item(Item(PayloadRef(json=payload), type="client_report")) self.send_envelope(project_id, envelope) + def send_user_feedback(self, project_id, payload): + envelope = Envelope() + envelope.add_item(Item(PayloadRef(json=payload), type="user_report_v2")) + self.send_envelope(project_id, envelope) + def send_metrics(self, project_id, payload): envelope = Envelope() envelope.add_item( diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py new file mode 100644 index 00000000000..4f0abfc5fdf --- /dev/null +++ b/tests/integration/test_feedback.py @@ -0,0 +1,111 @@ +import json + + +def generate_feedback_sdk_event(): + return { + "type": "user_report_v2", + "event_id": "d2132d31b39445f1938d7e21b6bf0ec4", + "timestamp": 1597977777.6189718, + "dist": "1.12", + "platform": "javascript", + "environment": "production", + "release": 42, + "tags": {"transaction": "/organizations/:orgId/performance/:eventSlug/"}, + "sdk": {"name": "name", "version": "veresion"}, + "user": { + "id": "123", + "username": "user", + "email": "user@site.com", + "ip_address": "192.168.11.12", + }, + "request": { + "url": None, + "headers": { + "user-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" + }, + }, + "contexts": { + "trace": { + "trace_id": "4C79F60C11214EB38604F4AE0781BFB2", + "span_id": "FA90FDEAD5F74052", + "type": "trace", + }, + "replay": { + "replay_id": "e2d42047b1c5431c8cba85ee2a8ab25d", + }, + }, + } + + +def test_feedback_event_with_processing( + mini_sentry, relay_with_processing, events_consumer +): + relay = relay_with_processing() + mini_sentry.add_basic_project_config( + 42, extra={"config": {"features": ["organizations:session-replay"]}} + ) + + _events_consumer = events_consumer(timeout=5) + feedback = generate_feedback_sdk_event() + + relay.send_user_feedback(42, feedback) + + replay_event, replay_event_message = _events_consumer.get_event() + assert replay_event["type"] == "user_report_v2" + # assert replay_event_message["retention_days"] == 90 + + parsed_feedback = json.loads(bytes(replay_event_message["payload"])) + # Assert required fields were returned. + assert parsed_feedback["event_id"] + assert parsed_feedback["type"] == feedback["type"] + assert parsed_feedback["dist"] == feedback["dist"] + assert parsed_feedback["platform"] == feedback["platform"] + assert parsed_feedback["environment"] == feedback["environment"] + assert parsed_feedback["release"] == str(feedback["release"]) + assert parsed_feedback["sdk"]["name"] == feedback["sdk"]["name"] + assert parsed_feedback["sdk"]["version"] == feedback["sdk"]["version"] + assert parsed_feedback["user"]["id"] == feedback["user"]["id"] + assert parsed_feedback["user"]["username"] == feedback["user"]["username"] + assert parsed_feedback["user"]["ip_address"] == feedback["user"]["ip_address"] + + assert parsed_feedback["user"]["email"] == "[email]" + assert parsed_feedback["timestamp"] + + # Assert the tags and requests objects were normalized to lists of doubles. + assert parsed_feedback["tags"] == [["transaction", feedback["tags"]["transaction"]]] + assert parsed_feedback["request"] == { + "headers": [["User-Agent", feedback["request"]["headers"]["user-Agent"]]] + } + + # Assert contexts object was pulled out. + assert parsed_feedback["contexts"] == { + "browser": {"name": "Safari", "version": "15.5", "type": "browser"}, + "device": {"brand": "Apple", "family": "Mac", "model": "Mac", "type": "device"}, + "os": {"name": "Mac OS X", "version": ">=10.15.7", "type": "os"}, + "replay": {"replay_id": "e2d42047b1c5431c8cba85ee2a8ab25d", "type": "replay"}, + "trace": { + "status": "unknown", + "trace_id": "4c79f60c11214eb38604f4ae0781bfb2", + "span_id": "fa90fdead5f74052", + "type": "trace", + }, + } + + +def test_replay_events_without_processing(mini_sentry, relay_chain): + relay = relay_chain(min_relay_version="latest") + + project_id = 42 + mini_sentry.add_basic_project_config( + project_id, extra={"config": {"features": ["organizations:session-replay"]}} + ) + + replay_item = generate_feedback_sdk_event() + + relay.send_user_feedback(42, replay_item) + + envelope = mini_sentry.captured_events.get(timeout=5) + assert len(envelope.items) == 1 + + userfeedback = envelope.items[0] + assert userfeedback.type == "user_report_v2" From aafea3e39031a4585364ec605471ee177d371b6c Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 16:16:10 -0700 Subject: [PATCH 02/20] feedback context --- .../src/protocol/contexts/feedback.rs | 79 +++++++++++++++++++ .../src/protocol/contexts/mod.rs | 5 +- .../src/protocol/contexts/replay.rs | 2 +- relay-server/src/actors/processor.rs | 2 +- tests/integration/test_feedback.py | 9 +++ 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 relay-event-schema/src/protocol/contexts/feedback.rs diff --git a/relay-event-schema/src/protocol/contexts/feedback.rs b/relay-event-schema/src/protocol/contexts/feedback.rs new file mode 100644 index 00000000000..5717fe7c886 --- /dev/null +++ b/relay-event-schema/src/protocol/contexts/feedback.rs @@ -0,0 +1,79 @@ +#[cfg(feature = "jsonschema")] +use relay_jsonschema_derive::JsonSchema; +use relay_protocol::{Annotated, Empty, FromValue, IntoValue, Object, Value}; + +use crate::processor::ProcessValue; + +/// Feedback context. +/// +/// The replay context contains the replay_id of the session replay if the event +/// occurred during a replay. The replay_id is added onto the dynamic sampling context +/// on the javascript SDK which propagates it through the trace. In relay, we take +/// this value from the DSC and create a context which contains only the replay_id +/// This context is never set on the client for events, only on relay. +#[derive(Clone, Debug, Default, PartialEq, Empty, FromValue, IntoValue, ProcessValue)] +#[cfg_attr(feature = "jsonschema", derive(JsonSchema))] +pub struct FeedbackContext { + /// The replay ID. + pub message: Annotated, + + #[metastructure(pii = "false")] + pub contact_email: Annotated, + /// Additional arbitrary fields for forwards compatibility. + #[metastructure(additional_properties, retain = "true")] + pub other: Object, +} + +impl super::DefaultContext for FeedbackContext { + fn default_key() -> &'static str { + "feedback" + } + + fn from_context(context: super::Context) -> Option { + match context { + super::Context::Feedback(c) => Some(*c), + _ => None, + } + } + + fn cast(context: &super::Context) -> Option<&Self> { + match context { + super::Context::Feedback(c) => Some(c), + _ => None, + } + } + + fn cast_mut(context: &mut super::Context) -> Option<&mut Self> { + match context { + super::Context::Feedback(c) => Some(c), + _ => None, + } + } + + fn into_context(self) -> super::Context { + super::Context::Feedback(Box::new(self)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::protocol::Context; + + #[test] + fn test_feedback_context() { + let json = r#"{ + "message": "test message", + "contact_email": "test@test.com", + "type": "feedback" +}"#; + let context = Annotated::new(Context::Feedback(Box::new(FeedbackContext { + message: Annotated::new("test message".to_string()), + contact_email: Annotated::new("test@test.com".to_string()), + other: Object::default(), + }))); + + assert_eq!(context, Annotated::from_json(json).unwrap()); + assert_eq!(json, context.to_json_pretty().unwrap()); + } +} diff --git a/relay-event-schema/src/protocol/contexts/mod.rs b/relay-event-schema/src/protocol/contexts/mod.rs index d7866c68160..e5c35b0549e 100644 --- a/relay-event-schema/src/protocol/contexts/mod.rs +++ b/relay-event-schema/src/protocol/contexts/mod.rs @@ -2,6 +2,7 @@ mod app; mod browser; mod cloud_resource; mod device; +mod feedback; mod gpu; mod monitor; mod os; @@ -12,11 +13,11 @@ mod reprocessing; mod response; mod runtime; mod trace; - pub use app::*; pub use browser::*; pub use cloud_resource::*; pub use device::*; +pub use feedback::*; pub use gpu::*; pub use monitor::*; pub use os::*; @@ -67,6 +68,8 @@ pub enum Context { Profile(Box), /// Information related to Replay. Replay(Box), + /// Information related to Feedback. + Feedback(Box), /// Information related to Monitors feature. Monitor(Box), /// Auxilliary information for reprocessing. diff --git a/relay-event-schema/src/protocol/contexts/replay.rs b/relay-event-schema/src/protocol/contexts/replay.rs index 19e8a803103..9ce30b4d125 100644 --- a/relay-event-schema/src/protocol/contexts/replay.rs +++ b/relay-event-schema/src/protocol/contexts/replay.rs @@ -59,7 +59,7 @@ mod tests { use crate::protocol::Context; #[test] - fn test_trace_context_roundtrip() { + fn test_replay_context() { let json = r#"{ "replay_id": "4c79f60c11214eb38604f4ae0781bfb2", "type": "replay" diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index f6a6493c5c1..16f7cdfc7cf 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1715,7 +1715,7 @@ impl EnvelopeProcessorService { // hint to normalization that we're dealing with a transaction now. self.event_from_json_payload(item, Some(EventType::Transaction))? }) - } else if let Some(mut item) = user_feedback_item { + } else if let Some(item) = user_feedback_item { relay_log::trace!("processing user feedback"); self.event_from_json_payload(item, Some(EventType::UserFeedback))? } else if let Some(mut item) = raw_security_item { diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index 4f0abfc5fdf..9bb926b2de2 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -25,6 +25,10 @@ def generate_feedback_sdk_event(): }, }, "contexts": { + "feedback": { + "message": "test message", + "contact_email": "test@example.com", + }, "trace": { "trace_id": "4C79F60C11214EB38604F4AE0781BFB2", "span_id": "FA90FDEAD5F74052", @@ -89,6 +93,11 @@ def test_feedback_event_with_processing( "span_id": "fa90fdead5f74052", "type": "trace", }, + "feedback": { + "message": "test message", + "contact_email": "test@example.com", + "type": "feedback", + }, } From 3909c5a9fa09d9ddf1b7dd2e6a050411dff9770d Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 16:30:09 -0700 Subject: [PATCH 03/20] add ingest feature flag --- relay-dynamic-config/src/feature.rs | 3 +++ relay-server/src/actors/processor.rs | 5 +++++ tests/integration/test_feedback.py | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/relay-dynamic-config/src/feature.rs b/relay-dynamic-config/src/feature.rs index 2c246917a9d..1710299f972 100644 --- a/relay-dynamic-config/src/feature.rs +++ b/relay-dynamic-config/src/feature.rs @@ -11,6 +11,9 @@ pub enum Feature { /// Enables data scrubbing of replay recording payloads. #[serde(rename = "organizations:session-replay-recording-scrubbing")] SessionReplayRecordingScrubbing, + /// Enables new User Feedback ingest + #[serde(rename = "organizations:user-feedback-ingest")] + UserFeedbackIngest, /// Enables device.class synthesis /// /// Enables device.class tag synthesis on mobile events. diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index 16f7cdfc7cf..824dab516d5 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1717,6 +1717,11 @@ impl EnvelopeProcessorService { }) } else if let Some(item) = user_feedback_item { relay_log::trace!("processing user feedback"); + let project_state = &state.project_state; + let feedback_ingest = project_state.has_feature(Feature::UserFeedbackIngest); + if !feedback_ingest { + return Err(ProcessingError::NoEventPayload); + } self.event_from_json_payload(item, Some(EventType::UserFeedback))? } else if let Some(mut item) = raw_security_item { relay_log::trace!("processing security report"); diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index 9bb926b2de2..3e84d2c4b39 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -46,7 +46,7 @@ def test_feedback_event_with_processing( ): relay = relay_with_processing() mini_sentry.add_basic_project_config( - 42, extra={"config": {"features": ["organizations:session-replay"]}} + 42, extra={"config": {"features": ["organizations:user-feedback-ingest"]}} ) _events_consumer = events_consumer(timeout=5) @@ -106,7 +106,8 @@ def test_replay_events_without_processing(mini_sentry, relay_chain): project_id = 42 mini_sentry.add_basic_project_config( - project_id, extra={"config": {"features": ["organizations:session-replay"]}} + project_id, + extra={"config": {"features": ["organizations:user-feedback-ingest"]}}, ) replay_item = generate_feedback_sdk_event() From a24ea5fd41024364ce789465cb37e00e66066b73 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 16:35:06 -0700 Subject: [PATCH 04/20] naming --- relay-base-schema/src/data_category.rs | 6 +++--- relay-base-schema/src/events.rs | 6 +++--- relay-dynamic-config/src/feature.rs | 2 +- relay-event-normalization/src/normalize/mod.rs | 4 ++-- relay-quotas/src/quota.rs | 2 +- relay-server/src/actors/processor.rs | 4 ++-- relay-server/src/envelope.rs | 2 +- relay-server/src/utils/rate_limits.rs | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index f90526738df..571d35cbfdd 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -60,7 +60,7 @@ pub enum DataCategory { /// User Feedback /// /// Represents a User Feedback processed - UserFeedback = 14, + UserReportV2 = 14, // // IMPORTANT: After adding a new entry to DataCategory, go to the `relay-cabi` subfolder and run // `make header` to regenerate the C-binding. This allows using the data category from Python. @@ -112,7 +112,7 @@ impl DataCategory { Self::Monitor => "monitor", Self::Span => "span", Self::MonitorSeat => "monitor_seat", - Self::UserFeedback => "user_feedback", + Self::UserReportV2 => "user_report_v2", Self::Unknown => "unknown", } } @@ -162,7 +162,7 @@ impl From for DataCategory { EventType::Csp | EventType::Hpkp | EventType::ExpectCt | EventType::ExpectStaple => { Self::Security } - EventType::UserFeedback => Self::UserFeedback, + EventType::UserReportV2 => Self::UserReportV2, } } } diff --git a/relay-base-schema/src/events.rs b/relay-base-schema/src/events.rs index 9f5f72101b2..38fa2d3775a 100644 --- a/relay-base-schema/src/events.rs +++ b/relay-base-schema/src/events.rs @@ -42,7 +42,7 @@ pub enum EventType { /// Performance monitoring transactions carrying spans. Transaction, /// User feedback payload. - UserFeedback, + UserReportV2, /// All events that do not qualify as any other type. #[serde(other)] #[default] @@ -73,7 +73,7 @@ impl FromStr for EventType { "expectct" => EventType::ExpectCt, "expectstaple" => EventType::ExpectStaple, "transaction" => EventType::Transaction, - "user_report_v2" => EventType::UserFeedback, + "user_report_v2" => EventType::UserReportV2, _ => return Err(ParseEventTypeError), }) } @@ -89,7 +89,7 @@ impl fmt::Display for EventType { EventType::ExpectCt => write!(f, "expectct"), EventType::ExpectStaple => write!(f, "expectstaple"), EventType::Transaction => write!(f, "transaction"), - EventType::UserFeedback => write!(f, "user_report_v2"), + EventType::UserReportV2 => write!(f, "user_report_v2"), } } } diff --git a/relay-dynamic-config/src/feature.rs b/relay-dynamic-config/src/feature.rs index 1710299f972..901adfe7f79 100644 --- a/relay-dynamic-config/src/feature.rs +++ b/relay-dynamic-config/src/feature.rs @@ -13,7 +13,7 @@ pub enum Feature { SessionReplayRecordingScrubbing, /// Enables new User Feedback ingest #[serde(rename = "organizations:user-feedback-ingest")] - UserFeedbackIngest, + UserReportV2Ingest, /// Enables device.class synthesis /// /// Enables device.class tag synthesis on mobile events. diff --git a/relay-event-normalization/src/normalize/mod.rs b/relay-event-normalization/src/normalize/mod.rs index 47cacef07ef..10e6b657c29 100644 --- a/relay-event-normalization/src/normalize/mod.rs +++ b/relay-event-normalization/src/normalize/mod.rs @@ -245,8 +245,8 @@ impl<'a> NormalizeProcessor<'a> { if event.ty.value() == Some(&EventType::Transaction) { return EventType::Transaction; } - if event.ty.value() == Some(&EventType::UserFeedback) { - return EventType::UserFeedback; + if event.ty.value() == Some(&EventType::UserReportV2) { + return EventType::UserReportV2; } // The SDKs do not describe event types, and we must infer them from available attributes. diff --git a/relay-quotas/src/quota.rs b/relay-quotas/src/quota.rs index 95b862fa7e8..821b3ef79e8 100644 --- a/relay-quotas/src/quota.rs +++ b/relay-quotas/src/quota.rs @@ -111,7 +111,7 @@ impl CategoryUnit { | DataCategory::Span | DataCategory::MonitorSeat | DataCategory::Monitor - | DataCategory::UserFeedback => Some(Self::Count), + | DataCategory::UserReportV2 => Some(Self::Count), DataCategory::Attachment => Some(Self::Bytes), DataCategory::Session => Some(Self::Batched), diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index 824dab516d5..1b232088c3a 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1718,11 +1718,11 @@ impl EnvelopeProcessorService { } else if let Some(item) = user_feedback_item { relay_log::trace!("processing user feedback"); let project_state = &state.project_state; - let feedback_ingest = project_state.has_feature(Feature::UserFeedbackIngest); + let feedback_ingest = project_state.has_feature(Feature::UserReportV2Ingest); if !feedback_ingest { return Err(ProcessingError::NoEventPayload); } - self.event_from_json_payload(item, Some(EventType::UserFeedback))? + self.event_from_json_payload(item, Some(EventType::UserReportV2))? } else if let Some(mut item) = raw_security_item { relay_log::trace!("processing security report"); sample_rates = item.take_sample_rates(); diff --git a/relay-server/src/envelope.rs b/relay-server/src/envelope.rs index 911b6c63392..7367c5274a3 100644 --- a/relay-server/src/envelope.rs +++ b/relay-server/src/envelope.rs @@ -128,7 +128,7 @@ impl ItemType { match event_type { EventType::Default | EventType::Error => ItemType::Event, EventType::Transaction => ItemType::Transaction, - EventType::UserFeedback => ItemType::UserReportV2, + EventType::UserReportV2 => ItemType::UserReportV2, EventType::Csp | EventType::Hpkp | EventType::ExpectCt | EventType::ExpectStaple => { ItemType::Security } diff --git a/relay-server/src/utils/rate_limits.rs b/relay-server/src/utils/rate_limits.rs index 82adf5b7045..a1aa37c726a 100644 --- a/relay-server/src/utils/rate_limits.rs +++ b/relay-server/src/utils/rate_limits.rs @@ -94,7 +94,7 @@ fn infer_event_category(item: &Item) -> Option { ItemType::Transaction => Some(DataCategory::Transaction), ItemType::Security | ItemType::RawSecurity => Some(DataCategory::Security), ItemType::UnrealReport => Some(DataCategory::Error), - ItemType::UserReportV2 => Some(DataCategory::UserFeedback), + ItemType::UserReportV2 => Some(DataCategory::UserReportV2), ItemType::Attachment if item.creates_event() => Some(DataCategory::Error), ItemType::Attachment => None, ItemType::Session => None, From 4af3e0c940d53290095f4c89a00a83c437cbe9fb Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 18:04:48 -0700 Subject: [PATCH 05/20] renames --- .vscode/settings.json | 2 +- relay-base-schema/src/data_category.rs | 4 ++- relay-base-schema/src/events.rs | 3 ++- relay-dynamic-config/src/feature.rs | 3 ++- .../src/protocol/contexts/mod.rs | 8 +++--- .../{feedback.rs => user_report_v2.rs} | 27 +++++++++---------- tests/integration/test_feedback.py | 3 ++- 7 files changed, 27 insertions(+), 23 deletions(-) rename relay-event-schema/src/protocol/contexts/{feedback.rs => user_report_v2.rs} (67%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 0d07fce5698..ddcd1bdb9a6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,7 @@ "editor.formatOnSave": true, "editor.formatOnType": true, "editor.tabSize": 4, - // "editor.rulers": [100], + "editor.rulers": [100], "files.autoSave": "onWindowChange", "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index 571d35cbfdd..d596ab2d0d8 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -59,7 +59,9 @@ pub enum DataCategory { MonitorSeat = 13, /// User Feedback /// - /// Represents a User Feedback processed + /// Represents a User Feedback processed. + /// Currently standardized on name UserReportV2 to avoid clashing with the old UserReport. + /// TODO(jferg): Rename this to UserFeedback once old UserReport is deprecated. UserReportV2 = 14, // // IMPORTANT: After adding a new entry to DataCategory, go to the `relay-cabi` subfolder and run diff --git a/relay-base-schema/src/events.rs b/relay-base-schema/src/events.rs index 38fa2d3775a..6968d241759 100644 --- a/relay-base-schema/src/events.rs +++ b/relay-base-schema/src/events.rs @@ -41,7 +41,8 @@ pub enum EventType { ExpectStaple, /// Performance monitoring transactions carrying spans. Transaction, - /// User feedback payload. + /// User feedback payload. TODO(Jferg): Change this to UserFeedback once old UserReport + /// logic is deprecated. UserReportV2, /// All events that do not qualify as any other type. #[serde(other)] diff --git a/relay-dynamic-config/src/feature.rs b/relay-dynamic-config/src/feature.rs index 901adfe7f79..ec0dd6747ea 100644 --- a/relay-dynamic-config/src/feature.rs +++ b/relay-dynamic-config/src/feature.rs @@ -11,7 +11,8 @@ pub enum Feature { /// Enables data scrubbing of replay recording payloads. #[serde(rename = "organizations:session-replay-recording-scrubbing")] SessionReplayRecordingScrubbing, - /// Enables new User Feedback ingest + /// Enables new User Feedback ingest. TODO(jferg): rename to UserFeedbackIngest + /// once old UserReport logic is deprecated. #[serde(rename = "organizations:user-feedback-ingest")] UserReportV2Ingest, /// Enables device.class synthesis diff --git a/relay-event-schema/src/protocol/contexts/mod.rs b/relay-event-schema/src/protocol/contexts/mod.rs index e5c35b0549e..fdc176f63e7 100644 --- a/relay-event-schema/src/protocol/contexts/mod.rs +++ b/relay-event-schema/src/protocol/contexts/mod.rs @@ -2,7 +2,6 @@ mod app; mod browser; mod cloud_resource; mod device; -mod feedback; mod gpu; mod monitor; mod os; @@ -13,11 +12,11 @@ mod reprocessing; mod response; mod runtime; mod trace; +mod user_report_v2; pub use app::*; pub use browser::*; pub use cloud_resource::*; pub use device::*; -pub use feedback::*; pub use gpu::*; pub use monitor::*; pub use os::*; @@ -28,6 +27,7 @@ pub use reprocessing::*; pub use response::*; pub use runtime::*; pub use trace::*; +pub use user_report_v2::*; #[cfg(feature = "jsonschema")] use relay_jsonschema_derive::JsonSchema; @@ -68,8 +68,8 @@ pub enum Context { Profile(Box), /// Information related to Replay. Replay(Box), - /// Information related to Feedback. - Feedback(Box), + /// Information related to User Report V2. TODO:(jferg): rename to UserFeedbackContext + UserReportV2(Box), /// Information related to Monitors feature. Monitor(Box), /// Auxilliary information for reprocessing. diff --git a/relay-event-schema/src/protocol/contexts/feedback.rs b/relay-event-schema/src/protocol/contexts/user_report_v2.rs similarity index 67% rename from relay-event-schema/src/protocol/contexts/feedback.rs rename to relay-event-schema/src/protocol/contexts/user_report_v2.rs index 5717fe7c886..c3a6b39f5e9 100644 --- a/relay-event-schema/src/protocol/contexts/feedback.rs +++ b/relay-event-schema/src/protocol/contexts/user_report_v2.rs @@ -6,17 +6,16 @@ use crate::processor::ProcessValue; /// Feedback context. /// -/// The replay context contains the replay_id of the session replay if the event -/// occurred during a replay. The replay_id is added onto the dynamic sampling context -/// on the javascript SDK which propagates it through the trace. In relay, we take -/// this value from the DSC and create a context which contains only the replay_id -/// This context is never set on the client for events, only on relay. +/// This contexts contains user feedback specific attributes. +/// We don't PII scrub contact_email as that is provided by the user. +/// TODO(jferg): rename to FeedbackContext once old UserReport logic is deprecated. #[derive(Clone, Debug, Default, PartialEq, Empty, FromValue, IntoValue, ProcessValue)] #[cfg_attr(feature = "jsonschema", derive(JsonSchema))] -pub struct FeedbackContext { - /// The replay ID. +pub struct UserReportV2Context { + /// The feedback message which contains what the user has to say. pub message: Annotated, + /// an email optionally provided by the user, which can be different from user.email #[metastructure(pii = "false")] pub contact_email: Annotated, /// Additional arbitrary fields for forwards compatibility. @@ -24,34 +23,34 @@ pub struct FeedbackContext { pub other: Object, } -impl super::DefaultContext for FeedbackContext { +impl super::DefaultContext for UserReportV2Context { fn default_key() -> &'static str { "feedback" } fn from_context(context: super::Context) -> Option { match context { - super::Context::Feedback(c) => Some(*c), + super::Context::UserReportV2(c) => Some(*c), _ => None, } } fn cast(context: &super::Context) -> Option<&Self> { match context { - super::Context::Feedback(c) => Some(c), + super::Context::UserReportV2(c) => Some(c), _ => None, } } fn cast_mut(context: &mut super::Context) -> Option<&mut Self> { match context { - super::Context::Feedback(c) => Some(c), + super::Context::UserReportV2(c) => Some(c), _ => None, } } fn into_context(self) -> super::Context { - super::Context::Feedback(Box::new(self)) + super::Context::UserReportV2(Box::new(self)) } } @@ -65,9 +64,9 @@ mod tests { let json = r#"{ "message": "test message", "contact_email": "test@test.com", - "type": "feedback" + "type": "userreportv2" }"#; - let context = Annotated::new(Context::Feedback(Box::new(FeedbackContext { + let context = Annotated::new(Context::UserReportV2(Box::new(UserReportV2Context { message: Annotated::new("test message".to_string()), contact_email: Annotated::new("test@test.com".to_string()), other: Object::default(), diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index 3e84d2c4b39..afe8a6bf944 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -28,6 +28,7 @@ def generate_feedback_sdk_event(): "feedback": { "message": "test message", "contact_email": "test@example.com", + "type": "userreportv2", }, "trace": { "trace_id": "4C79F60C11214EB38604F4AE0781BFB2", @@ -96,7 +97,7 @@ def test_feedback_event_with_processing( "feedback": { "message": "test message", "contact_email": "test@example.com", - "type": "feedback", + "type": "userreportv2", }, } From 62cf1bda593a5bea725fa7b2d0a219b1b7815bd4 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 18:07:10 -0700 Subject: [PATCH 06/20] adjust naming --- relay-server/src/actors/processor.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/relay-server/src/actors/processor.rs b/relay-server/src/actors/processor.rs index 1b232088c3a..b76a4c49759 100644 --- a/relay-server/src/actors/processor.rs +++ b/relay-server/src/actors/processor.rs @@ -1682,7 +1682,8 @@ impl EnvelopeProcessorService { let transaction_item = envelope.take_item_by(|item| item.ty() == &ItemType::Transaction); let security_item = envelope.take_item_by(|item| item.ty() == &ItemType::Security); let raw_security_item = envelope.take_item_by(|item| item.ty() == &ItemType::RawSecurity); - let user_feedback_item = envelope.take_item_by(|item| item.ty() == &ItemType::UserReportV2); + let user_report_v2_item = + envelope.take_item_by(|item| item.ty() == &ItemType::UserReportV2); let form_item = envelope.take_item_by(|item| item.ty() == &ItemType::FormData); let attachment_item = envelope @@ -1715,11 +1716,11 @@ impl EnvelopeProcessorService { // hint to normalization that we're dealing with a transaction now. self.event_from_json_payload(item, Some(EventType::Transaction))? }) - } else if let Some(item) = user_feedback_item { - relay_log::trace!("processing user feedback"); + } else if let Some(item) = user_report_v2_item { + relay_log::trace!("processing user_report_v2"); let project_state = &state.project_state; - let feedback_ingest = project_state.has_feature(Feature::UserReportV2Ingest); - if !feedback_ingest { + let user_report_v2_ingest = project_state.has_feature(Feature::UserReportV2Ingest); + if !user_report_v2_ingest { return Err(ProcessingError::NoEventPayload); } self.event_from_json_payload(item, Some(EventType::UserReportV2))? From ab75fe7f949d9fdcd646c2f68d307c5b63cf8372 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 18:23:25 -0700 Subject: [PATCH 07/20] adjust naming --- relay-base-schema/src/events.rs | 4 ++-- relay-server/src/envelope.rs | 4 ++-- tests/integration/fixtures/__init__.py | 2 +- tests/integration/test_feedback.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/relay-base-schema/src/events.rs b/relay-base-schema/src/events.rs index 6968d241759..6f210317e1f 100644 --- a/relay-base-schema/src/events.rs +++ b/relay-base-schema/src/events.rs @@ -74,7 +74,7 @@ impl FromStr for EventType { "expectct" => EventType::ExpectCt, "expectstaple" => EventType::ExpectStaple, "transaction" => EventType::Transaction, - "user_report_v2" => EventType::UserReportV2, + "feedback" => EventType::UserReportV2, _ => return Err(ParseEventTypeError), }) } @@ -90,7 +90,7 @@ impl fmt::Display for EventType { EventType::ExpectCt => write!(f, "expectct"), EventType::ExpectStaple => write!(f, "expectstaple"), EventType::Transaction => write!(f, "transaction"), - EventType::UserReportV2 => write!(f, "user_report_v2"), + EventType::UserReportV2 => write!(f, "feedback"), } } } diff --git a/relay-server/src/envelope.rs b/relay-server/src/envelope.rs index 7367c5274a3..76827842050 100644 --- a/relay-server/src/envelope.rs +++ b/relay-server/src/envelope.rs @@ -147,7 +147,7 @@ impl fmt::Display for ItemType { Self::RawSecurity => write!(f, "raw_security"), Self::UnrealReport => write!(f, "unreal_report"), Self::UserReport => write!(f, "user_report"), - Self::UserReportV2 => write!(f, "user_report_v2"), + Self::UserReportV2 => write!(f, "feedback"), Self::Session => write!(f, "session"), Self::Sessions => write!(f, "sessions"), Self::Statsd => write!(f, "statsd"), @@ -176,7 +176,7 @@ impl std::str::FromStr for ItemType { "raw_security" => Self::RawSecurity, "unreal_report" => Self::UnrealReport, "user_report" => Self::UserReport, - "user_report_v2" => Self::UserReportV2, + "feedback" => Self::UserReportV2, "session" => Self::Session, "sessions" => Self::Sessions, "statsd" => Self::Statsd, diff --git a/tests/integration/fixtures/__init__.py b/tests/integration/fixtures/__init__.py index 342e78200a0..2d5971d7d73 100644 --- a/tests/integration/fixtures/__init__.py +++ b/tests/integration/fixtures/__init__.py @@ -222,7 +222,7 @@ def send_client_report(self, project_id, payload): def send_user_feedback(self, project_id, payload): envelope = Envelope() - envelope.add_item(Item(PayloadRef(json=payload), type="user_report_v2")) + envelope.add_item(Item(PayloadRef(json=payload), type="feedback")) self.send_envelope(project_id, envelope) def send_metrics(self, project_id, payload): diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index afe8a6bf944..a07040a09a2 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -3,7 +3,7 @@ def generate_feedback_sdk_event(): return { - "type": "user_report_v2", + "type": "feedback", "event_id": "d2132d31b39445f1938d7e21b6bf0ec4", "timestamp": 1597977777.6189718, "dist": "1.12", @@ -56,7 +56,7 @@ def test_feedback_event_with_processing( relay.send_user_feedback(42, feedback) replay_event, replay_event_message = _events_consumer.get_event() - assert replay_event["type"] == "user_report_v2" + assert replay_event["type"] == "feedback" # assert replay_event_message["retention_days"] == 90 parsed_feedback = json.loads(bytes(replay_event_message["payload"])) From 6e80db15aac881820c2477d5a00a0ca388868740 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 18:44:08 -0700 Subject: [PATCH 08/20] accept snapshot --- .../test_fixtures__event_schema.snap | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/relay-server/tests/snapshots/test_fixtures__event_schema.snap b/relay-server/tests/snapshots/test_fixtures__event_schema.snap index a20c258a928..30a974423f2 100644 --- a/relay-server/tests/snapshots/test_fixtures__event_schema.snap +++ b/relay-server/tests/snapshots/test_fixtures__event_schema.snap @@ -913,6 +913,9 @@ expression: "relay_event_schema::protocol::event_json_schema()" { "$ref": "#/definitions/ReplayContext" }, + { + "$ref": "#/definitions/UserReportV2Context" + }, { "$ref": "#/definitions/MonitorContext" }, @@ -1455,6 +1458,7 @@ expression: "relay_event_schema::protocol::event_json_schema()" "expectct", "expectstaple", "transaction", + "userreportv2", "default" ] }, @@ -3736,6 +3740,33 @@ expression: "relay_event_schema::protocol::event_json_schema()" "additionalProperties": false } ] + }, + "UserReportV2Context": { + "description": " Feedback context.\n\n This contexts contains user feedback specific attributes.\n We don't PII scrub contact_email as that is provided by the user.\n TODO(jferg): rename to FeedbackContext once old UserReport logic is deprecated.", + "anyOf": [ + { + "type": "object", + "properties": { + "contact_email": { + "description": " an email optionally provided by the user, which can be different from user.email", + "default": null, + "type": [ + "string", + "null" + ] + }, + "message": { + "description": " The feedback message which contains what the user has to say.", + "default": null, + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + } + ] } } } From f27108b33d4252bb512d3f819cbc60bd535156b4 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 22:47:09 -0700 Subject: [PATCH 09/20] fix integration test --- tests/integration/test_feedback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index a07040a09a2..12c827b0064 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -102,7 +102,7 @@ def test_feedback_event_with_processing( } -def test_replay_events_without_processing(mini_sentry, relay_chain): +def test_feedback_events_without_processing(mini_sentry, relay_chain): relay = relay_chain(min_relay_version="latest") project_id = 42 @@ -119,4 +119,4 @@ def test_replay_events_without_processing(mini_sentry, relay_chain): assert len(envelope.items) == 1 userfeedback = envelope.items[0] - assert userfeedback.type == "user_report_v2" + assert userfeedback.type == "feedback" From d21785753163bb2cafc047f2ba2abfe9571d66c2 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Thu, 12 Oct 2023 23:32:09 -0700 Subject: [PATCH 10/20] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 434a1c0abfe..fb8c289c058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Accept spans needed for the mobile Starfish module. ([#2570](https://github.com/getsentry/relay/pull/2570)) - Extract size metrics and blocking status tag for resource spans. ([#2578](https://github.com/getsentry/relay/pull/2578)) - Add a setting to rollout ingesting all resource spans. ([#2586](https://github.com/getsentry/relay/pull/2586)) +- Add User Feedback Ingestion. ([#2604](https://github.com/getsentry/relay/pull/2604)) **Bug Fixes**: From ae47896f3dccbfca6fefbd03b400da42a752a4f3 Mon Sep 17 00:00:00 2001 From: Josh Ferge Date: Mon, 23 Oct 2023 16:49:57 -0700 Subject: [PATCH 11/20] Update relay-dynamic-config/src/feature.rs Co-authored-by: Iker Barriocanal <32816711+iker-barriocanal@users.noreply.github.com> --- relay-dynamic-config/src/feature.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay-dynamic-config/src/feature.rs b/relay-dynamic-config/src/feature.rs index 1a18baf665b..ba7f44041e0 100644 --- a/relay-dynamic-config/src/feature.rs +++ b/relay-dynamic-config/src/feature.rs @@ -11,8 +11,9 @@ pub enum Feature { /// Enables data scrubbing of replay recording payloads. #[serde(rename = "organizations:session-replay-recording-scrubbing")] SessionReplayRecordingScrubbing, - /// Enables new User Feedback ingest. TODO(jferg): rename to UserFeedbackIngest - /// once old UserReport logic is deprecated. + /// Enables new User Feedback ingest. + /// + /// TODO(jferg): rename to UserFeedbackIngest once old UserReport logic is deprecated. #[serde(rename = "organizations:user-feedback-ingest")] UserReportV2Ingest, /// Enables device.class synthesis From 137f75030c53529357a5842a3e38a9166ea1562f Mon Sep 17 00:00:00 2001 From: Josh Ferge Date: Mon, 23 Oct 2023 16:50:06 -0700 Subject: [PATCH 12/20] Update relay-base-schema/src/events.rs Co-authored-by: Iker Barriocanal <32816711+iker-barriocanal@users.noreply.github.com> --- relay-base-schema/src/events.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/relay-base-schema/src/events.rs b/relay-base-schema/src/events.rs index 6f210317e1f..0849d6acaaf 100644 --- a/relay-base-schema/src/events.rs +++ b/relay-base-schema/src/events.rs @@ -41,8 +41,9 @@ pub enum EventType { ExpectStaple, /// Performance monitoring transactions carrying spans. Transaction, - /// User feedback payload. TODO(Jferg): Change this to UserFeedback once old UserReport - /// logic is deprecated. + /// User feedback payload. + /// + /// TODO(Jferg): Change this to UserFeedback once old UserReport logic is deprecated. UserReportV2, /// All events that do not qualify as any other type. #[serde(other)] From fac716f0185d8a662f57845d30a8d63c12135dc4 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Tue, 24 Oct 2023 13:12:01 -0700 Subject: [PATCH 13/20] update C headers and changelogs --- CHANGELOG.md | 5 +- py/CHANGELOG.md | 644 +++++++++++++++++++++++++------------ relay-cabi/include/relay.h | 20 +- 3 files changed, 451 insertions(+), 218 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71e48ae9819..5ece91deccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unrelease +**Features** + +- Add User Feedback Ingestion. ([#2604](https://github.com/getsentry/relay/pull/2604)) + **Internal**: - Disable resource link span ingestion. ([#2647](https://github.com/getsentry/relay/pull/2647)) @@ -30,7 +34,6 @@ - Accept spans needed for the mobile Starfish module. ([#2570](https://github.com/getsentry/relay/pull/2570)) - Extract size metrics and blocking status tag for resource spans. ([#2578](https://github.com/getsentry/relay/pull/2578)) - Add a setting to rollout ingesting all resource spans. ([#2586](https://github.com/getsentry/relay/pull/2586)) -- Add User Feedback Ingestion. ([#2604](https://github.com/getsentry/relay/pull/2604)) - Drop events starting or ending before January 1, 1970 UTC. ([#2613](https://github.com/getsentry/relay/pull/2613)) - Add support for X-Sentry-Forwarded-For header. ([#2572](https://github.com/getsentry/relay/pull/2572)) diff --git a/py/CHANGELOG.md b/py/CHANGELOG.md index 86524faa970..64ab24315dc 100644 --- a/py/CHANGELOG.md +++ b/py/CHANGELOG.md @@ -2,44 +2,64 @@ ## Unreleased -- Add `scraping_attempts` field to the event schema. ([#2575](https://github.com/getsentry/relay/pull/2575)) -- Drop events starting or ending before January 1, 1970 UTC. ([#2613](https://github.com/getsentry/relay/pull/2613)) -- Remove event spans starting or ending before January 1, 1970 UTC. ([#2627](https://github.com/getsentry/relay/pull/2627)) -- Remove event breadcrumbs dating before January 1, 1970 UTC. ([#2635](https://github.com/getsentry/relay/pull/2635)) -- Add `locale` ,`screen_width_pixels`, `screen_height_pixels`, and `uuid` to the device context. ([#2640](https://github.com/getsentry/relay/pull/2640)) +- Add `scraping_attempts` field to the event schema. + ([#2575](https://github.com/getsentry/relay/pull/2575)) +- Drop events starting or ending before January 1, 1970 UTC. + ([#2613](https://github.com/getsentry/relay/pull/2613)) +- Remove event spans starting or ending before January 1, 1970 UTC. + ([#2627](https://github.com/getsentry/relay/pull/2627)) +- Remove event breadcrumbs dating before January 1, 1970 UTC. + ([#2635](https://github.com/getsentry/relay/pull/2635)) +- Add `locale` ,`screen_width_pixels`, `screen_height_pixels`, and `uuid` to the + device context. ([#2640](https://github.com/getsentry/relay/pull/2640)) +- Add feedback DataCategory. + ([#2604](https://github.com/getsentry/relay/pull/2604)) ## 0.8.31 -- Add `Reservoir` variant to `SamplingRule`. ([#2550](https://github.com/getsentry/relay/pull/2550)) -- Remove dynamic sampling ABI. ([#2515](https://github.com/getsentry/relay/pull/2515)) -- Scrub span descriptions with encoded data images. ([#2560](https://github.com/getsentry/relay/pull/2560)) +- Add `Reservoir` variant to `SamplingRule`. + ([#2550](https://github.com/getsentry/relay/pull/2550)) +- Remove dynamic sampling ABI. + ([#2515](https://github.com/getsentry/relay/pull/2515)) +- Scrub span descriptions with encoded data images. + ([#2560](https://github.com/getsentry/relay/pull/2560)) ## 0.8.30 -- Filter out exceptions originating in Safari extensions. ([#2408](https://github.com/getsentry/relay/pull/2408)) -- Add a `DataCategory` for monitor seats (crons). ([#2480](https://github.com/getsentry/relay/pull/2480)) -- Expose global config normalization function. ([#2498](https://github.com/getsentry/relay/pull/2498)) +- Filter out exceptions originating in Safari extensions. + ([#2408](https://github.com/getsentry/relay/pull/2408)) +- Add a `DataCategory` for monitor seats (crons). + ([#2480](https://github.com/getsentry/relay/pull/2480)) +- Expose global config normalization function. + ([#2498](https://github.com/getsentry/relay/pull/2498)) ## 0.8.29 -- Add rudimentary Mypy setup. ([#2384](https://github.com/getsentry/relay/pull/2384)) +- Add rudimentary Mypy setup. + ([#2384](https://github.com/getsentry/relay/pull/2384)) ## 0.8.28 This release requires Python 3.8 or later. -- Add the configuration protocol for generic metrics extraction. ([#2252](https://github.com/getsentry/relay/pull/2252)) -- Modernize python syntax. ([#2264](https://github.com/getsentry/relay/pull/2264)) +- Add the configuration protocol for generic metrics extraction. + ([#2252](https://github.com/getsentry/relay/pull/2252)) +- Modernize python syntax. + ([#2264](https://github.com/getsentry/relay/pull/2264)) ## 0.8.27 -- Add is_enabled flag on transaction filter. ([#2251](https://github.com/getsentry/relay/pull/2251)) +- Add is_enabled flag on transaction filter. + ([#2251](https://github.com/getsentry/relay/pull/2251)) ## 0.8.26 -- Add filter based on transaction names. ([#2118](https://github.com/getsentry/relay/pull/2118)) -- Add `lock` attribute to the frame protocol. ([#2171](https://github.com/getsentry/relay/pull/2171)) -- Add trace context to CheckIns. ([#2241](https://github.com/getsentry/relay/pull/2241)) +- Add filter based on transaction names. + ([#2118](https://github.com/getsentry/relay/pull/2118)) +- Add `lock` attribute to the frame protocol. + ([#2171](https://github.com/getsentry/relay/pull/2171)) +- Add trace context to CheckIns. + ([#2241](https://github.com/getsentry/relay/pull/2241)) ## 0.8.25 @@ -49,217 +69,345 @@ This release requires Python 3.8 or later. ## 0.8.24 -- Compile regexes in PII config validation. ([#2152](https://github.com/getsentry/relay/pull/2152)) +- Compile regexes in PII config validation. + ([#2152](https://github.com/getsentry/relay/pull/2152)) ## 0.8.23 -- Add `txNameReady` flag to project config. ([#2128](https://github.com/getsentry/relay/pull/2128)) +- Add `txNameReady` flag to project config. + ([#2128](https://github.com/getsentry/relay/pull/2128)) ## 0.8.22 -- Store `geo.subdivision` of the end user location. ([#2058](https://github.com/getsentry/relay/pull/2058)) -- Scrub URLs in span descriptions. ([#2095](https://github.com/getsentry/relay/pull/2095)) -- Add new FFI function for running dynamic sampling. ([#2091](https://github.com/getsentry/relay/pull/2091)) +- Store `geo.subdivision` of the end user location. + ([#2058](https://github.com/getsentry/relay/pull/2058)) +- Scrub URLs in span descriptions. + ([#2095](https://github.com/getsentry/relay/pull/2095)) +- Add new FFI function for running dynamic sampling. + ([#2091](https://github.com/getsentry/relay/pull/2091)) ## 0.8.21 -- Add a data category for indexed profiles. ([#2051](https://github.com/getsentry/relay/pull/2051)) +- Add a data category for indexed profiles. + ([#2051](https://github.com/getsentry/relay/pull/2051)) ## 0.8.20 -- Add `thread.state` field to protocol. ([#1896](https://github.com/getsentry/relay/pull/1896)) -- Smart trim loggers for Java platforms. ([#1941](https://github.com/getsentry/relay/pull/1941)) -- Perform PII scrubbing on meta's original_value field. ([#1892](https://github.com/getsentry/relay/pull/1892)) -- PII scrub `span.data` by default. ([#1953](https://github.com/getsentry/relay/pull/1953)) -- Scrub sensitive cookies. ([#1951](https://github.com/getsentry/relay/pull/1951)) -- Changes how device class is determined for iPhone devices. Instead of checking processor frequency, the device model is mapped to a device class. ([#1970](https://github.com/getsentry/relay/pull/1970)) -- Don't sanitize transactions if no clustering rules exist and no UUIDs were scrubbed. ([#1976](https://github.com/getsentry/relay/pull/1976)) -- Add iPad support for device.class synthesis in light normalization. ([#2008](https://github.com/getsentry/relay/pull/2008)) -- Include unknown feature flags in project config when serializing it. ([#2040](https://github.com/getsentry/relay/pull/2040)) +- Add `thread.state` field to protocol. + ([#1896](https://github.com/getsentry/relay/pull/1896)) +- Smart trim loggers for Java platforms. + ([#1941](https://github.com/getsentry/relay/pull/1941)) +- Perform PII scrubbing on meta's original_value field. + ([#1892](https://github.com/getsentry/relay/pull/1892)) +- PII scrub `span.data` by default. + ([#1953](https://github.com/getsentry/relay/pull/1953)) +- Scrub sensitive cookies. + ([#1951](https://github.com/getsentry/relay/pull/1951)) +- Changes how device class is determined for iPhone devices. Instead of checking + processor frequency, the device model is mapped to a device class. + ([#1970](https://github.com/getsentry/relay/pull/1970)) +- Don't sanitize transactions if no clustering rules exist and no UUIDs were + scrubbed. ([#1976](https://github.com/getsentry/relay/pull/1976)) +- Add iPad support for device.class synthesis in light normalization. + ([#2008](https://github.com/getsentry/relay/pull/2008)) +- Include unknown feature flags in project config when serializing it. + ([#2040](https://github.com/getsentry/relay/pull/2040)) ## 0.8.19 -- Protocol validation for source map image type. ([#1869](https://github.com/getsentry/relay/pull/1869)) -- Scrub `span.data.http.query` with default scrubbers. ([#1889](https://github.com/getsentry/relay/pull/1889)) -- Add Cloud Resource context. ([#1854](https://github.com/getsentry/relay/pull/1854)) -- Add a `DataCategory` for monitors (crons). ([#1886](https://github.com/getsentry/relay/pull/1886)) +- Protocol validation for source map image type. + ([#1869](https://github.com/getsentry/relay/pull/1869)) +- Scrub `span.data.http.query` with default scrubbers. + ([#1889](https://github.com/getsentry/relay/pull/1889)) +- Add Cloud Resource context. + ([#1854](https://github.com/getsentry/relay/pull/1854)) +- Add a `DataCategory` for monitors (crons). + ([#1886](https://github.com/getsentry/relay/pull/1886)) ## 0.8.18 -- Add `instruction_addr_adjustment` field to `RawStacktrace`. ([#1716](https://github.com/getsentry/relay/pull/1716)) -- Make sure to scrub all the fields with PII. If the fields contain an object, the entire object will be removed. ([#1789](https://github.com/getsentry/relay/pull/1789)) -- Add new schema for dynamic sampling rules. ([#1790](https://github.com/getsentry/relay/pull/1790) -- Keep meta for removed custom measurements. ([#1815](https://github.com/getsentry/relay/pull/1815)) +- Add `instruction_addr_adjustment` field to `RawStacktrace`. + ([#1716](https://github.com/getsentry/relay/pull/1716)) +- Make sure to scrub all the fields with PII. If the fields contain an object, + the entire object will be removed. + ([#1789](https://github.com/getsentry/relay/pull/1789)) +- Add new schema for dynamic sampling rules. + ([#1790](https://github.com/getsentry/relay/pull/1790) +- Keep meta for removed custom measurements. + ([#1815](https://github.com/getsentry/relay/pull/1815)) ## 0.8.17 -- Add utility function for matching CODEOWNER paths against a stacktrace filepath ([#1746](https://github.com/getsentry/relay/pull/1746)) +- Add utility function for matching CODEOWNER paths against a stacktrace + filepath ([#1746](https://github.com/getsentry/relay/pull/1746)) ## 0.8.16 -- The minimum required Python version is now 3.8. This release does not contain known breaking changes for Python 3.7, but we no longer guarantee compatibility. -- Add support for decaying functions in dynamic sampling rules. ([#1692](https://github.com/getsentry/relay/pull/1692)) -- Add Profiling Context to event protocol. ([#1748](https://github.com/getsentry/relay/pull/1748)) -- Add OpenTelemetry Context to event protocol. ([#1617](https://github.com/getsentry/relay/pull/1617)) -- Add `app.in_foreground` and `thread.main` flag to event protocol. ([#1578](https://github.com/getsentry/relay/pull/1578)) -- Scrub all fields with IP addresses rather than only known IP address fields. ([#1725](https://github.com/getsentry/relay/pull/1725)) -- Disallow `-` in measurement and breakdown names. These items are converted to metrics, which do not allow `-` in their name. ([#1571](https://github.com/getsentry/relay/pull/1571)) -- Validate the distribution name in the event. ([#1556](https://github.com/getsentry/relay/pull/1556)) -- Use correct meta object for logentry in light normalization. ([#1577](https://github.com/getsentry/relay/pull/1577)) +- The minimum required Python version is now 3.8. This release does not contain + known breaking changes for Python 3.7, but we no longer guarantee + compatibility. +- Add support for decaying functions in dynamic sampling rules. + ([#1692](https://github.com/getsentry/relay/pull/1692)) +- Add Profiling Context to event protocol. + ([#1748](https://github.com/getsentry/relay/pull/1748)) +- Add OpenTelemetry Context to event protocol. + ([#1617](https://github.com/getsentry/relay/pull/1617)) +- Add `app.in_foreground` and `thread.main` flag to event protocol. + ([#1578](https://github.com/getsentry/relay/pull/1578)) +- Scrub all fields with IP addresses rather than only known IP address fields. + ([#1725](https://github.com/getsentry/relay/pull/1725)) +- Disallow `-` in measurement and breakdown names. These items are converted to + metrics, which do not allow `-` in their name. + ([#1571](https://github.com/getsentry/relay/pull/1571)) +- Validate the distribution name in the event. + ([#1556](https://github.com/getsentry/relay/pull/1556)) +- Use correct meta object for logentry in light normalization. + ([#1577](https://github.com/getsentry/relay/pull/1577)) ## 0.8.15 -- Restore correct behavior when `is_renormalize` is specified on `normalize_event`. ([#1548](https://github.com/getsentry/relay/pull/1548)) +- Restore correct behavior when `is_renormalize` is specified on + `normalize_event`. ([#1548](https://github.com/getsentry/relay/pull/1548)) ## 0.8.14 [YANKED] -**Warning:** This release contains a regression. Please update to a more recent version. - -- Add `transaction_info` to event payloads, including the transaction's source and internal original transaction name. ([#1330](https://github.com/getsentry/relay/pull/1330)) -- Add user-agent parsing to replays processor. ([#1420](https://github.com/getsentry/relay/pull/1420)) -- `convert_datascrubbing_config` will now return an error string when conversion fails on big regexes. ([#1474](https://github.com/getsentry/relay/pull/1474)) -- `relay_pii_strip_event` now treats any key containing `token` as a password. ([#1527](https://github.com/getsentry/relay/pull/1527)) -- Add data category for indexed transactions. This will come to represent stored transactions, while the existing category will represent transaction metrics. ([#1535](https://github.com/getsentry/relay/pull/1535)) +**Warning:** This release contains a regression. Please update to a more recent +version. + +- Add `transaction_info` to event payloads, including the transaction's source + and internal original transaction name. + ([#1330](https://github.com/getsentry/relay/pull/1330)) +- Add user-agent parsing to replays processor. + ([#1420](https://github.com/getsentry/relay/pull/1420)) +- `convert_datascrubbing_config` will now return an error string when conversion + fails on big regexes. ([#1474](https://github.com/getsentry/relay/pull/1474)) +- `relay_pii_strip_event` now treats any key containing `token` as a password. + ([#1527](https://github.com/getsentry/relay/pull/1527)) +- Add data category for indexed transactions. This will come to represent stored + transactions, while the existing category will represent transaction metrics. + ([#1535](https://github.com/getsentry/relay/pull/1535)) ## 0.8.13 -- Add a data category constant for Replays. ([#1239](https://github.com/getsentry/relay/pull/1239)) -- Add data category constant for processed transactions, encompassing all transactions that have been received and sent through dynamic sampling as well as metrics extraction. ([#1306](https://github.com/getsentry/relay/pull/1306)) -- Extend trace sampling protocol to deal with flat user data. ([#1318](https://github.com/getsentry/relay/pull/1318)) +- Add a data category constant for Replays. + ([#1239](https://github.com/getsentry/relay/pull/1239)) +- Add data category constant for processed transactions, encompassing all + transactions that have been received and sent through dynamic sampling as well + as metrics extraction. ([#1306](https://github.com/getsentry/relay/pull/1306)) +- Extend trace sampling protocol to deal with flat user data. + ([#1318](https://github.com/getsentry/relay/pull/1318)) ## 0.8.12 -- Fix missing profile data category in the python library of 0.8.11 by regenerating the header for C-bindings. ([#1278](https://github.com/getsentry/relay/pull/1278)) +- Fix missing profile data category in the python library of 0.8.11 by + regenerating the header for C-bindings. + ([#1278](https://github.com/getsentry/relay/pull/1278)) ## 0.8.11 -- Add protocol support for custom units on transaction measurements. ([#1256](https://github.com/getsentry/relay/pull/1256)) -- Add a profile data category and count profiles in an envelope to apply rate limits. ([#1259](https://github.com/getsentry/relay/pull/1259)) +- Add protocol support for custom units on transaction measurements. + ([#1256](https://github.com/getsentry/relay/pull/1256)) +- Add a profile data category and count profiles in an envelope to apply rate + limits. ([#1259](https://github.com/getsentry/relay/pull/1259)) ## 0.8.10 -- Map Windows version from raw_description to version name (XP, Vista, 11, ...). ([#1219](https://github.com/getsentry/relay/pull/1219)) -- Update rust-minidump to 0.10.0 ([#1209](https://github.com/getsentry/relay/pull/1209)) +- Map Windows version from raw_description to version name (XP, Vista, 11, ...). + ([#1219](https://github.com/getsentry/relay/pull/1219)) +- Update rust-minidump to 0.10.0 + ([#1209](https://github.com/getsentry/relay/pull/1209)) - Update regex to 1.5.5 ([#1207](https://github.com/getsentry/relay/pull/1207)) -- Update the user agent parser (uap-core Feb 2020 to Nov 2021). ([#1143](https://github.com/getsentry/relay/pull/1143), [#1145](https://github.com/getsentry/relay/pull/1145)) -- Improvements to Unity OS context parsing ([#1150](https://github.com/getsentry/relay/pull/1150)) +- Update the user agent parser (uap-core Feb 2020 to Nov 2021). + ([#1143](https://github.com/getsentry/relay/pull/1143), + [#1145](https://github.com/getsentry/relay/pull/1145)) +- Improvements to Unity OS context parsing + ([#1150](https://github.com/getsentry/relay/pull/1150)) ## 0.8.9 -- Add the exclusive time of a span. ([#1061](https://github.com/getsentry/relay/pull/1061)) -- Add `ingest_path` to the event schema, capturing Relays that processed this event. ([#1062](https://github.com/getsentry/relay/pull/1062)) -- Retrieve OS Context for Unity Events. ([#1072](https://github.com/getsentry/relay/pull/1072)) -- Protocol support for client reports. ([#1081](https://github.com/getsentry/relay/pull/1081)) -- Add the exclusive time of the transaction's root span. ([#1083](https://github.com/getsentry/relay/pull/1083)) -- Build and publish binary wheels for `arm64` / `aarch64` on macOS and Linux. ([#1100](https://github.com/getsentry/relay/pull/1100)) +- Add the exclusive time of a span. + ([#1061](https://github.com/getsentry/relay/pull/1061)) +- Add `ingest_path` to the event schema, capturing Relays that processed this + event. ([#1062](https://github.com/getsentry/relay/pull/1062)) +- Retrieve OS Context for Unity Events. + ([#1072](https://github.com/getsentry/relay/pull/1072)) +- Protocol support for client reports. + ([#1081](https://github.com/getsentry/relay/pull/1081)) +- Add the exclusive time of the transaction's root span. + ([#1083](https://github.com/getsentry/relay/pull/1083)) +- Build and publish binary wheels for `arm64` / `aarch64` on macOS and Linux. + ([#1100](https://github.com/getsentry/relay/pull/1100)) ## 0.8.8 -- Bump release parser to 1.3.0 and add ability to compare versions. ([#1038](https://github.com/getsentry/relay/pull/1038)) +- Bump release parser to 1.3.0 and add ability to compare versions. + ([#1038](https://github.com/getsentry/relay/pull/1038)) ## 1.1.4 - 2021-07-14 [YANKED] -- Bump release parser to 1.1.4. ([#1031](https://github.com/getsentry/relay/pull/1031)) +- Bump release parser to 1.1.4. + ([#1031](https://github.com/getsentry/relay/pull/1031)) ## 0.8.7 -- Bump release parser to 1.0.0. ([#1013](https://github.com/getsentry/relay/pull/1013)) +- Bump release parser to 1.0.0. + ([#1013](https://github.com/getsentry/relay/pull/1013)) ## 0.8.6 -- Add back `breadcrumb.event_id`. ([#977](https://github.com/getsentry/relay/pull/977)) -- Add `frame.stack_start` for chained async stack traces. ([#981](https://github.com/getsentry/relay/pull/981)) -- Fix roundtrip error when PII selector starts with number. ([#982](https://github.com/getsentry/relay/pull/982)) -- Explicitly declare reprocessing context. ([#1009](https://github.com/getsentry/relay/pull/1009)) -- Add `safari-web-extension` to known browser extensions. ([#1011](https://github.com/getsentry/relay/pull/1011)) +- Add back `breadcrumb.event_id`. + ([#977](https://github.com/getsentry/relay/pull/977)) +- Add `frame.stack_start` for chained async stack traces. + ([#981](https://github.com/getsentry/relay/pull/981)) +- Fix roundtrip error when PII selector starts with number. + ([#982](https://github.com/getsentry/relay/pull/982)) +- Explicitly declare reprocessing context. + ([#1009](https://github.com/getsentry/relay/pull/1009)) +- Add `safari-web-extension` to known browser extensions. + ([#1011](https://github.com/getsentry/relay/pull/1011)) ## 0.8.5 -- Skip serializing some null values in frames interface. ([#944](https://github.com/getsentry/relay/pull/944)) -- Make request url scrubbable. ([#955](https://github.com/getsentry/relay/pull/955)) +- Skip serializing some null values in frames interface. + ([#944](https://github.com/getsentry/relay/pull/944)) +- Make request url scrubbable. + ([#955](https://github.com/getsentry/relay/pull/955)) ## 0.8.4 -- Deny backslashes in release names. ([#904](https://github.com/getsentry/relay/pull/904)) -- Remove dependencies on `openssl` and `zlib`. ([#914](https://github.com/getsentry/relay/pull/914)) -- Fix `and` and `or` operators in PII selectors on fields declaring `pii=maybe`. ([#932](https://github.com/getsentry/relay/pull/932)) -- Enable PII stripping on `user.username`. ([#935](https://github.com/getsentry/relay/pull/935)) -- Expose dynamic rule condition validation. ([#941](https://github.com/getsentry/relay/pull/941)) +- Deny backslashes in release names. + ([#904](https://github.com/getsentry/relay/pull/904)) +- Remove dependencies on `openssl` and `zlib`. + ([#914](https://github.com/getsentry/relay/pull/914)) +- Fix `and` and `or` operators in PII selectors on fields declaring `pii=maybe`. + ([#932](https://github.com/getsentry/relay/pull/932)) +- Enable PII stripping on `user.username`. + ([#935](https://github.com/getsentry/relay/pull/935)) +- Expose dynamic rule condition validation. + ([#941](https://github.com/getsentry/relay/pull/941)) ## 0.8.3 -- Add NSError to mechanism. ([#925](https://github.com/getsentry/relay/pull/925)) -- Add snapshot to the stack trace interface. ([#927](https://github.com/getsentry/relay/pull/927)) +- Add NSError to mechanism. + ([#925](https://github.com/getsentry/relay/pull/925)) +- Add snapshot to the stack trace interface. + ([#927](https://github.com/getsentry/relay/pull/927)) - Drop python 2.7 support. ([#929](https://github.com/getsentry/relay/pull/929)) ## 0.8.2 -- Fix compile errors in the sdist with Rust 1.47 and later. ([#801](https://github.com/getsentry/relay/pull/801)) -- Emit more useful normalization meta data for invalid tags. ([#808](https://github.com/getsentry/relay/pull/808)) -- Internal refactoring such that validating of characters in tags no longer uses regexes internally. ([#814](https://github.com/getsentry/relay/pull/814)) -- Normalize `breadcrumb.ty` into `breadcrumb.type` for broken Python SDK versions. ([#824](https://github.com/getsentry/relay/pull/824)) -- Emit event errors and normalization errors for unknown breadcrumb keys. ([#824](https://github.com/getsentry/relay/pull/824)) -- Make `$error.value` `pii=true`. ([#837](https://github.com/getsentry/relay/pull/837)) -- Add protocol support for WASM. ([#852](https://github.com/getsentry/relay/pull/852)) -- Add missing fields for Expect-CT reports. ([#865](https://github.com/getsentry/relay/pull/865)) -- Support more directives in CSP reports, such as `block-all-mixed-content` and `require-trusted-types-for`. ([#876](https://github.com/getsentry/relay/pull/876)) -- Fix a long-standing bug where log messages were not addressible as `$string`. ([#882](https://github.com/getsentry/relay/pull/882)) -- Use manylinux2010 to build releases instead of manylinux1 to fix issues with newer Rust. ([#917](https://github.com/getsentry/relay/pull/917)) +- Fix compile errors in the sdist with Rust 1.47 and later. + ([#801](https://github.com/getsentry/relay/pull/801)) +- Emit more useful normalization meta data for invalid tags. + ([#808](https://github.com/getsentry/relay/pull/808)) +- Internal refactoring such that validating of characters in tags no longer uses + regexes internally. ([#814](https://github.com/getsentry/relay/pull/814)) +- Normalize `breadcrumb.ty` into `breadcrumb.type` for broken Python SDK + versions. ([#824](https://github.com/getsentry/relay/pull/824)) +- Emit event errors and normalization errors for unknown breadcrumb keys. + ([#824](https://github.com/getsentry/relay/pull/824)) +- Make `$error.value` `pii=true`. + ([#837](https://github.com/getsentry/relay/pull/837)) +- Add protocol support for WASM. + ([#852](https://github.com/getsentry/relay/pull/852)) +- Add missing fields for Expect-CT reports. + ([#865](https://github.com/getsentry/relay/pull/865)) +- Support more directives in CSP reports, such as `block-all-mixed-content` and + `require-trusted-types-for`. + ([#876](https://github.com/getsentry/relay/pull/876)) +- Fix a long-standing bug where log messages were not addressible as `$string`. + ([#882](https://github.com/getsentry/relay/pull/882)) +- Use manylinux2010 to build releases instead of manylinux1 to fix issues with + newer Rust. ([#917](https://github.com/getsentry/relay/pull/917)) ## 0.8.1 -- Add support for measurement ingestion. ([#724](https://github.com/getsentry/relay/pull/724), [#785](https://github.com/getsentry/relay/pull/785)) +- Add support for measurement ingestion. + ([#724](https://github.com/getsentry/relay/pull/724), + [#785](https://github.com/getsentry/relay/pull/785)) ## 0.8.0 -- Fix issue where `$span` would not be recognized in Advanced Data Scrubbing. ([#781](https://github.com/getsentry/relay/pull/781)) -- Require macOS 10.15.0 or newer for the macOS wheel after moving to GitHub Actions. ([#780](https://github.com/getsentry/relay/pull/780)) +- Fix issue where `$span` would not be recognized in Advanced Data Scrubbing. + ([#781](https://github.com/getsentry/relay/pull/781)) +- Require macOS 10.15.0 or newer for the macOS wheel after moving to GitHub + Actions. ([#780](https://github.com/getsentry/relay/pull/780)) ## 0.7.0 -- In PII configs, all options on hash and mask redactions (replacement characters, ignored characters, hash algorithm/key) are removed. If they still exist in the configuration, they are ignored. ([#760](https://github.com/getsentry/relay/pull/760)) -- Rename to the library target to `relay_cabi` and add documentation. ([#763](https://github.com/getsentry/relay/pull/763)) -- Update FFI bindings with a new implementation for error handling. ([#766](https://github.com/getsentry/relay/pull/766)) -- **Breaking:** Delete `scrub_event` function from public API. ([#773](https://github.com/getsentry/relay/pull/773)) -- Add Relay version version to challenge response. ([#758](https://github.com/getsentry/relay/pull/758)) +- In PII configs, all options on hash and mask redactions (replacement + characters, ignored characters, hash algorithm/key) are removed. If they still + exist in the configuration, they are ignored. + ([#760](https://github.com/getsentry/relay/pull/760)) +- Rename to the library target to `relay_cabi` and add documentation. + ([#763](https://github.com/getsentry/relay/pull/763)) +- Update FFI bindings with a new implementation for error handling. + ([#766](https://github.com/getsentry/relay/pull/766)) +- **Breaking:** Delete `scrub_event` function from public API. + ([#773](https://github.com/getsentry/relay/pull/773)) +- Add Relay version version to challenge response. + ([#758](https://github.com/getsentry/relay/pull/758)) ## 0.6.1 - Removed deprecated `pii_selectors_from_event`. -- Return `UnpackErrorSignatureExpired` from `validate_register_response` when the timestamp is too old. +- Return `UnpackErrorSignatureExpired` from `validate_register_response` when + the timestamp is too old. ## 0.6.0 -- Updates the authentication mechanism by introducing a signed register state. Signatures of `create_register_challenge` and `validate_register_response` now take a mandatory `secret` parameter, and the public key is encoded into the state. ([#743](https://github.com/getsentry/relay/pull/743)) +- Updates the authentication mechanism by introducing a signed register state. + Signatures of `create_register_challenge` and `validate_register_response` now + take a mandatory `secret` parameter, and the public key is encoded into the + state. ([#743](https://github.com/getsentry/relay/pull/743)) ## 0.5.13 -_Note: This accidentally got released as 0.15.13 as well, which has since been yanked._ +_Note: This accidentally got released as 0.15.13 as well, which has since been +yanked._ -- Fix Python 3 incompatibilities in Relay authentication helpers. ([#712](https://github.com/getsentry/relay/pull/712)) +- Fix Python 3 incompatibilities in Relay authentication helpers. + ([#712](https://github.com/getsentry/relay/pull/712)) ## 0.5.12 -- Always create a spans array for transactions in normalization. ([#667](https://github.com/getsentry/relay/pull/667)) -- Retain the full span description in transaction events instead of trimming it. ([#674](https://github.com/getsentry/relay/pull/674)) -- Move hashed user ip addresses to `user.id` to avoid invalid IPs going into Snuba. ([#692](https://github.com/getsentry/relay/pull/692)) -- Add `is_version_supported` to check for Relay compatibility during authentication. ([#697](https://github.com/getsentry/relay/pull/697)) +- Always create a spans array for transactions in normalization. + ([#667](https://github.com/getsentry/relay/pull/667)) +- Retain the full span description in transaction events instead of trimming it. + ([#674](https://github.com/getsentry/relay/pull/674)) +- Move hashed user ip addresses to `user.id` to avoid invalid IPs going into + Snuba. ([#692](https://github.com/getsentry/relay/pull/692)) +- Add `is_version_supported` to check for Relay compatibility during + authentication. ([#697](https://github.com/getsentry/relay/pull/697)) ## 0.5.11 -- Add SpanStatus to span struct. ([#603](https://github.com/getsentry/relay/pull/603)) -- Apply clock drift correction for timestamps that are too far in the past or future. This fixes a bug where broken transaction timestamps would lead to negative durations. ([#634](https://github.com/getsentry/relay/pull/634), [#654](https://github.com/getsentry/relay/pull/654)) -- Add missing .NET 4.8 version mapping for runtime context normalization. ([#642](https://github.com/getsentry/relay/pull/642)) -- Expose `DataCategory` and `SpanStatus` via the C-ABI to Python for code sharing. ([#651](https://github.com/getsentry/relay/pull/651)) +- Add SpanStatus to span struct. + ([#603](https://github.com/getsentry/relay/pull/603)) +- Apply clock drift correction for timestamps that are too far in the past or + future. This fixes a bug where broken transaction timestamps would lead to + negative durations. ([#634](https://github.com/getsentry/relay/pull/634), + [#654](https://github.com/getsentry/relay/pull/654)) +- Add missing .NET 4.8 version mapping for runtime context normalization. + ([#642](https://github.com/getsentry/relay/pull/642)) +- Expose `DataCategory` and `SpanStatus` via the C-ABI to Python for code + sharing. ([#651](https://github.com/getsentry/relay/pull/651)) ## 0.5.10 -- Set default transaction name ([#576](https://github.com/getsentry/relay/pull/576)) -- Apply clock drift correction based on received_at ([#580](https://github.com/getsentry/relay/pull/580), [#582](https://github.com/getsentry/relay/pull/582)) -- Add AWS Security Scanner to web crawlers ([#577](https://github.com/getsentry/relay/pull/577)) -- Do not default transactions to level error ([#585](https://github.com/getsentry/relay/pull/585)) -- Update `sentry-release-parser` to 0.6.0 ([#590](https://github.com/getsentry/relay/pull/590)) -- Add schema for success metrics (failed and errored processing) ([#593](https://github.com/getsentry/relay/pull/593)) +- Set default transaction name + ([#576](https://github.com/getsentry/relay/pull/576)) +- Apply clock drift correction based on received_at + ([#580](https://github.com/getsentry/relay/pull/580), + [#582](https://github.com/getsentry/relay/pull/582)) +- Add AWS Security Scanner to web crawlers + ([#577](https://github.com/getsentry/relay/pull/577)) +- Do not default transactions to level error + ([#585](https://github.com/getsentry/relay/pull/585)) +- Update `sentry-release-parser` to 0.6.0 + ([#590](https://github.com/getsentry/relay/pull/590)) +- Add schema for success metrics (failed and errored processing) + ([#593](https://github.com/getsentry/relay/pull/593)) ## 0.5.9 @@ -275,12 +423,17 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.5.7 - Release is now a required attribute for session data. -- `unknown` can now be used in place of `unknown_error` for span statuses. A future release will change the canonical format from `unknown_error` to `unknown`. +- `unknown` can now be used in place of `unknown_error` for span statuses. A + future release will change the canonical format from `unknown_error` to + `unknown`. ## 0.5.6 -- Minor updates to PII processing: Aliases for value types (`$error` instead of `$exception` to be in sync with Discover column naming) and adding a default for replace-redactions. -- It is now valid to send transactions and spans without `op` set, in which case a default value will be inserted. +- Minor updates to PII processing: Aliases for value types (`$error` instead of + `$exception` to be in sync with Discover column naming) and adding a default + for replace-redactions. +- It is now valid to send transactions and spans without `op` set, in which case + a default value will be inserted. ## 0.5.5 @@ -296,25 +449,34 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.5.3 -- Validate release names during event ingestion ([#479](https://github.com/getsentry/relay/pull/479)) -- Add browser extension filter ([#470](https://github.com/getsentry/relay/pull/470)) -- Add `pii=maybe`, a new kind of event schema field that can only be scrubbed if explicitly addressed. +- Validate release names during event ingestion + ([#479](https://github.com/getsentry/relay/pull/479)) +- Add browser extension filter + ([#470](https://github.com/getsentry/relay/pull/470)) +- Add `pii=maybe`, a new kind of event schema field that can only be scrubbed if + explicitly addressed. - Add way to scrub filepaths in a way that does not break processing. -- Add missing errors for JSON parsing and release validation ([#478](https://github.com/getsentry/relay/pull/478)) -- Expose more datascrubbing utils ([#464](https://github.com/getsentry/relay/pull/464)) +- Add missing errors for JSON parsing and release validation + ([#478](https://github.com/getsentry/relay/pull/478)) +- Expose more datascrubbing utils + ([#464](https://github.com/getsentry/relay/pull/464)) ## 0.5.2 -- Misc bugfixes in PII processor. Those bugs do not affect the legacy data scrubber exposed in Python. +- Misc bugfixes in PII processor. Those bugs do not affect the legacy data + scrubber exposed in Python. - Polishing documentation around PII configuration format. - Signal codes in mach mechanism are no longer required. ## 0.5.1 -- Bump xcode version from 7.3 to 9.4, dropping wheel support for some older OS X versions. +- Bump xcode version from 7.3 to 9.4, dropping wheel support for some older OS X + versions. - New function `validate_pii_config`. -- Fix a bug in the PII processor that would always remove the entire string on `pattern` rules. -- Ability to correct some clock drift and wrong system time in transaction events. +- Fix a bug in the PII processor that would always remove the entire string on + `pattern` rules. +- Ability to correct some clock drift and wrong system time in transaction + events. ## 0.5.0 @@ -337,9 +499,12 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.63 -- Fix a bug where glob-matching in filters did not behave correctly when the to-be-matched string contained newlines. -- Add `moz-extension:` as scheme for browser extensions (filtering out Firefox addons). -- Raise a dedicated Python exception type for invalid transaction events. Also do not report that error to Sentry from Relay. +- Fix a bug where glob-matching in filters did not behave correctly when the + to-be-matched string contained newlines. +- Add `moz-extension:` as scheme for browser extensions (filtering out Firefox + addons). +- Raise a dedicated Python exception type for invalid transaction events. Also + do not report that error to Sentry from Relay. ## 0.4.62 @@ -350,25 +515,34 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.61 -- Add `thread.errored` attribute ([#306](https://github.com/getsentry/relay/pull/306)). +- Add `thread.errored` attribute + ([#306](https://github.com/getsentry/relay/pull/306)). ## 0.4.60 -- License is now BSL instead of MIT ([#301](https://github.com/getsentry/relay/pull/301)). -- Transaction events with negative duration are now rejected ([#291](https://github.com/getsentry/relay/pull/291)). +- License is now BSL instead of MIT + ([#301](https://github.com/getsentry/relay/pull/301)). +- Transaction events with negative duration are now rejected + ([#291](https://github.com/getsentry/relay/pull/291)). - Fix a panic when normalizing certain dates. ## 0.4.59 -- Fix: Normalize legacy stacktrace attributes ([#292](https://github.com/getsentry/relay/pull/292)) -- Fix: Validate platform attributes ([#294](https://github.com/getsentry/relay/pull/294)) +- Fix: Normalize legacy stacktrace attributes + ([#292](https://github.com/getsentry/relay/pull/292)) +- Fix: Validate platform attributes + ([#294](https://github.com/getsentry/relay/pull/294)) ## 0.4.58 -- Expose globbing code from Relay to Python ([#288](https://github.com/getsentry/relay/pull/288)) -- Normalize before datascrubbing ([#290](https://github.com/getsentry/relay/pull/290)) -- Selectively log internal errors to stderr ([#285](https://github.com/getsentry/relay/pull/285)) -- Do not ignore `process_value` result in `scrub_event` ([#284](https://github.com/getsentry/relay/pull/284)) +- Expose globbing code from Relay to Python + ([#288](https://github.com/getsentry/relay/pull/288)) +- Normalize before datascrubbing + ([#290](https://github.com/getsentry/relay/pull/290)) +- Selectively log internal errors to stderr + ([#285](https://github.com/getsentry/relay/pull/285)) +- Do not ignore `process_value` result in `scrub_event` + ([#284](https://github.com/getsentry/relay/pull/284)) ## 0.4.57 @@ -409,7 +583,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.48 -- Fix various bugs in the datascrubber and PII processing code to get closer to behavior of the Python implementation. +- Fix various bugs in the datascrubber and PII processing code to get closer to + behavior of the Python implementation. ## 0.4.47 @@ -417,7 +592,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.46 -- Resolved a regression in IP address normalization. The new behavior is closer to a line-by-line port of the old Python code. +- Resolved a regression in IP address normalization. The new behavior is closer + to a line-by-line port of the old Python code. ## 0.4.45 @@ -425,12 +601,14 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.44 -- Only take the user IP address from the store request's IP for certain platforms. This restores the behavior of the old Python code. +- Only take the user IP address from the store request's IP for certain + platforms. This restores the behavior of the old Python code. ## 0.4.43 - Bump size of breadcrumbs -- Workaround for an issue where we would not parse OS information from User Agent when SDK had already sent OS information. +- Workaround for an issue where we would not parse OS information from User + Agent when SDK had already sent OS information. ## 0.4.42 @@ -485,7 +663,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.30 -- Make exception messages/values larger to allow for foreign stacktrace data to be attached. +- Make exception messages/values larger to allow for foreign stacktrace data to + be attached. ## 0.4.29 @@ -497,7 +676,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.27 -- Increase frame vars size again! Byte size was fine, but max depth was way too small. +- Increase frame vars size again! Byte size was fine, but max depth was way too + small. ## 0.4.26 @@ -509,43 +689,55 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.24 -- Reject non-http/https `help_urls` in exception mechanisms ([#192](https://github.com/getsentry/relay/pull/192)) +- Reject non-http/https `help_urls` in exception mechanisms + ([#192](https://github.com/getsentry/relay/pull/192)) ## 0.4.23 -- Add basic truncation to event meta to prevent payload size from spiralling out of control. +- Add basic truncation to event meta to prevent payload size from spiralling out + of control. ## 0.4.22 -- Improve the grouping protocol config ([#190](https://github.com/getsentry/relay/pull/190)) +- Improve the grouping protocol config + ([#190](https://github.com/getsentry/relay/pull/190)) ## 0.4.21 -- Add new debug image variants ([#188](https://github.com/getsentry/relay/pull/188)) -- Trim release and environment ([#184](https://github.com/getsentry/relay/pull/184)) +- Add new debug image variants + ([#188](https://github.com/getsentry/relay/pull/188)) +- Trim release and environment + ([#184](https://github.com/getsentry/relay/pull/184)) ## 0.4.20 -- Alias level critical as fatal ([#182](https://github.com/getsentry/relay/pull/182)) -- Add device properties from Java/.NET SDKs ([#185](https://github.com/getsentry/relay/pull/185)) -- Add `lang` to frame and stacktrace ([#186](https://github.com/getsentry/relay/pull/186)) +- Alias level critical as fatal + ([#182](https://github.com/getsentry/relay/pull/182)) +- Add device properties from Java/.NET SDKs + ([#185](https://github.com/getsentry/relay/pull/185)) +- Add `lang` to frame and stacktrace + ([#186](https://github.com/getsentry/relay/pull/186)) ## 0.4.19 -- Add mode for renormalization ([#181](https://github.com/getsentry/relay/pull/181)) +- Add mode for renormalization + ([#181](https://github.com/getsentry/relay/pull/181)) ## 0.4.18 -- Restore the original behavior with supporting very large values in extra ([#180](https://github.com/getsentry/relay/pull/180)) +- Restore the original behavior with supporting very large values in extra + ([#180](https://github.com/getsentry/relay/pull/180)) ## 0.4.17 -- Add untyped spans for tracing ([#179](https://github.com/getsentry/relay/pull/179)) +- Add untyped spans for tracing + ([#179](https://github.com/getsentry/relay/pull/179)) - Add the `none` event type ## 0.4.16 -- Add support for synthetic mechanism markers ([#177](https://github.com/getsentry/relay/pull/177)) +- Add support for synthetic mechanism markers + ([#177](https://github.com/getsentry/relay/pull/177)) ## 0.4.15 @@ -555,16 +747,19 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y - Rename `template_info` to template - Add two new untyped context types: `gpu`, `monitors` -- Rewrite `derive(ProcessValue)` to use `Structure::each_variant` ([#175](https://github.com/getsentry/relay/pull/175)) +- Rewrite `derive(ProcessValue)` to use `Structure::each_variant` + ([#175](https://github.com/getsentry/relay/pull/175)) ## 0.4.13 -- Allow arrays as header values ([#176](https://github.com/getsentry/relay/pull/176)) +- Allow arrays as header values + ([#176](https://github.com/getsentry/relay/pull/176)) - Swap `python-json-read-adapter` to git dependency ## 0.4.12 -- Run json.dumps at max depth in databag ([#174](https://github.com/getsentry/relay/pull/174)) +- Run json.dumps at max depth in databag + ([#174](https://github.com/getsentry/relay/pull/174)) ## 0.4.11 @@ -576,12 +771,14 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.9 -- Trim containers one level before max_depth ([#173](https://github.com/getsentry/relay/pull/173)) +- Trim containers one level before max_depth + ([#173](https://github.com/getsentry/relay/pull/173)) - Unconditionally overwrite `received` ## 0.4.8 -- Fix bugs in array trimming, more code comments ([#172](https://github.com/getsentry/relay/pull/172)) +- Fix bugs in array trimming, more code comments + ([#172](https://github.com/getsentry/relay/pull/172)) ## 0.4.7 @@ -589,12 +786,15 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.6 -- Reject exceptions with empty type and value ([#170](https://github.com/getsentry/relay/pull/170)) -- Validate remote_addr before backfilling into user ([#171](https://github.com/getsentry/relay/pull/171)) +- Reject exceptions with empty type and value + ([#170](https://github.com/getsentry/relay/pull/170)) +- Validate remote_addr before backfilling into user + ([#171](https://github.com/getsentry/relay/pull/171)) ## 0.4.5 -- Adjust limits to fit values into db ([#167](https://github.com/getsentry/relay/pull/167)) +- Adjust limits to fit values into db + ([#167](https://github.com/getsentry/relay/pull/167)) - Environment is 64 chars in db - Normalize macOS ([#168](https://github.com/getsentry/relay/pull/168)) - Use right maxchars for `transaction`, `dist`, `release` @@ -602,46 +802,67 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.4.4 -- Reject unknown debug images ([#163](https://github.com/getsentry/relay/pull/163)) -- Include original_value in `Meta::eq` ([#164](https://github.com/getsentry/relay/pull/164)) -- Emit correct expectations for common types ([#162](https://github.com/getsentry/relay/pull/162)) -- Permit invalid emails in user interface ([#161](https://github.com/getsentry/relay/pull/161)) +- Reject unknown debug images + ([#163](https://github.com/getsentry/relay/pull/163)) +- Include original_value in `Meta::eq` + ([#164](https://github.com/getsentry/relay/pull/164)) +- Emit correct expectations for common types + ([#162](https://github.com/getsentry/relay/pull/162)) +- Permit invalid emails in user interface + ([#161](https://github.com/getsentry/relay/pull/161)) - Drop long tags correctly ([#165](https://github.com/getsentry/relay/pull/165)) -- Do not skip null values in pairlists ([#166](https://github.com/getsentry/relay/pull/166)) +- Do not skip null values in pairlists + ([#166](https://github.com/getsentry/relay/pull/166)) ## 0.4.3 -- Fix broken sdk_info parsing ([#156](https://github.com/getsentry/relay/pull/156)) -- Add basic snapshot tests for normalize and event parsing ([#154](https://github.com/getsentry/relay/pull/154)) +- Fix broken sdk_info parsing + ([#156](https://github.com/getsentry/relay/pull/156)) +- Add basic snapshot tests for normalize and event parsing + ([#154](https://github.com/getsentry/relay/pull/154)) - Context trimming ([#153](https://github.com/getsentry/relay/pull/153)) -- Coerce PHP frame vars array to object ([#159](https://github.com/getsentry/relay/pull/159)) +- Coerce PHP frame vars array to object + ([#159](https://github.com/getsentry/relay/pull/159)) ## 0.4.2 - Remove content-type params - Dont attempt to free() if python is shutting down -- Improve cookie header normalizations ([#151](https://github.com/getsentry/relay/pull/151)) -- Implement LogEntry formatting ([#152](https://github.com/getsentry/relay/pull/152)) +- Improve cookie header normalizations + ([#151](https://github.com/getsentry/relay/pull/151)) +- Implement LogEntry formatting + ([#152](https://github.com/getsentry/relay/pull/152)) - Deduplicate tags ([#155](https://github.com/getsentry/relay/pull/155)) - Treat empty paths like no paths in frame normalization - Remove cookie header when explicit cookies are given ## 0.4.1 -- Do not remove empty cookies or headers ([#138](https://github.com/getsentry/relay/pull/138)) -- Skip more empty containers ([#139](https://github.com/getsentry/relay/pull/139)) -- Make `request.header` values lenient ([#145](https://github.com/getsentry/relay/pull/145)) -- Remove internal tags when backfilling ([#146](https://github.com/getsentry/relay/pull/146)) -- Implement advanced context normalization ([#140](https://github.com/getsentry/relay/pull/140)) -- Retain additional properties in contexts ([#141](https://github.com/getsentry/relay/pull/141)) -- Implement very lenient URL parsing ([#147](https://github.com/getsentry/relay/pull/147)) -- Do not require breadcrumb timestamps ([#144](https://github.com/getsentry/relay/pull/144)) -- Reject tags with long keys ([#149](https://github.com/getsentry/relay/pull/149)) +- Do not remove empty cookies or headers + ([#138](https://github.com/getsentry/relay/pull/138)) +- Skip more empty containers + ([#139](https://github.com/getsentry/relay/pull/139)) +- Make `request.header` values lenient + ([#145](https://github.com/getsentry/relay/pull/145)) +- Remove internal tags when backfilling + ([#146](https://github.com/getsentry/relay/pull/146)) +- Implement advanced context normalization + ([#140](https://github.com/getsentry/relay/pull/140)) +- Retain additional properties in contexts + ([#141](https://github.com/getsentry/relay/pull/141)) +- Implement very lenient URL parsing + ([#147](https://github.com/getsentry/relay/pull/147)) +- Do not require breadcrumb timestamps + ([#144](https://github.com/getsentry/relay/pull/144)) +- Reject tags with long keys + ([#149](https://github.com/getsentry/relay/pull/149)) ## 0.4.0 -- Add new options max_concurrent_events ([#134](https://github.com/getsentry/relay/pull/134)) -- Dont move stacktrace before normalizing it ([#135](https://github.com/getsentry/relay/pull/135)) +- Add new options max_concurrent_events + ([#134](https://github.com/getsentry/relay/pull/134)) +- Dont move stacktrace before normalizing it + ([#135](https://github.com/getsentry/relay/pull/135)) - Fix broken repr and crash when shutting down python - Port slim_frame_data ([#137](https://github.com/getsentry/relay/pull/137)) - Special treatment for ellipsis in URLs @@ -649,20 +870,29 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.3.0 -- Changed PII stripping rule format to permit path selectors when applying rules. This means that now `$string` refers to strings for instance and `user.id` refers to the `id` field in the `user` attribute of the event. Temporarily support for old rules is retained. +- Changed PII stripping rule format to permit path selectors when applying + rules. This means that now `$string` refers to strings for instance and + `user.id` refers to the `id` field in the `user` attribute of the event. + Temporarily support for old rules is retained. ## 0.2.7 -- Minor fixes to be closer to Python. Ability to disable trimming of objects, arrays and strings. +- Minor fixes to be closer to Python. Ability to disable trimming of objects, + arrays and strings. ## 0.2.6 -- Fix bug where PII stripping would remove containers without leaving any metadata about the retraction. +- Fix bug where PII stripping would remove containers without leaving any + metadata about the retraction. - Fix bug where old `redactPair` rules would stop working. ## 0.2.5 -- Rewrite of PII stripping logic. This brings potentially breaking changes to the semantics of PII configs. Most importantly field types such as `"freeform"` and `"databag"` are gone, right now there is only `"container"` and `"text"`. All old field types should have become an alias for `"text"`, but take extra care in ensuring your PII rules still work. +- Rewrite of PII stripping logic. This brings potentially breaking changes to + the semantics of PII configs. Most importantly field types such as + `"freeform"` and `"databag"` are gone, right now there is only `"container"` + and `"text"`. All old field types should have become an alias for `"text"`, + but take extra care in ensuring your PII rules still work. - Minor fixes to be closer to Python. @@ -677,7 +907,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.2.2 - Fix segfault when trying to process contexts. -- Fix trimming state "leaking" between interfaces, leading to excessive trimming. +- Fix trimming state "leaking" between interfaces, leading to excessive + trimming. - Don't serialize empty arrays and objects (with a few exceptions). ## 0.2.1 @@ -686,7 +917,8 @@ _Note: This accidentally got released as 0.15.13 as well, which has since been y ## 0.2.0 -- Updated event processing: Events from older SDKs are now supported. Also, we've fixed some bugs along the line. +- Updated event processing: Events from older SDKs are now supported. Also, + we've fixed some bugs along the line. - Introduced full support for PII stripping. ## 0.1.3 diff --git a/relay-cabi/include/relay.h b/relay-cabi/include/relay.h index 7baed863809..55a1ea451ec 100644 --- a/relay-cabi/include/relay.h +++ b/relay-cabi/include/relay.h @@ -3,7 +3,7 @@ #ifndef RELAY_H_INCLUDED #define RELAY_H_INCLUDED -/* Generated with cbindgen:0.25.0 */ +/* Generated with cbindgen:0.26.0 */ /* Warning, this file is autogenerated. Do not modify this manually. */ @@ -88,6 +88,14 @@ enum RelayDataCategory { * is also used outside of Relay via the Python package. */ RELAY_DATA_CATEGORY_MONITOR_SEAT = 13, + /** + * User Feedback + * + * Represents a User Feedback processed. + * Currently standardized on name UserReportV2 to avoid clashing with the old UserReport. + * TODO(jferg): Rename this to UserFeedback once old UserReport is deprecated. + */ + RELAY_DATA_CATEGORY_USER_REPORT_V2 = 14, /** * Any other data category not known by this Relay. */ @@ -616,14 +624,4 @@ struct RelayStr relay_validate_project_config(const struct RelayStr *value, */ struct RelayStr normalize_global_config(const struct RelayStr *value); -/** - * Runs dynamic sampling given the sampling config, root sampling config, DSC and event. - * - * Returns the sampling decision containing the sample_rate and the list of matched rule ids. - */ -struct RelayStr run_dynamic_sampling(const struct RelayStr *sampling_config, - const struct RelayStr *root_sampling_config, - const struct RelayStr *dsc, - const struct RelayStr *event); - #endif /* RELAY_H_INCLUDED */ From 7ac820703abc16d03361bd02ea16019216dccc7b Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Tue, 24 Oct 2023 13:17:25 -0700 Subject: [PATCH 14/20] add data category --- py/sentry_relay/consts.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/sentry_relay/consts.py b/py/sentry_relay/consts.py index 5f70ada3752..4e962a4aeaa 100644 --- a/py/sentry_relay/consts.py +++ b/py/sentry_relay/consts.py @@ -24,6 +24,7 @@ class DataCategory(IntEnum): PROFILE_INDEXED = 11 SPAN = 12 MONITOR_SEAT = 13 + USER_REPORT_V2 = 14 UNKNOWN = -1 # end generated From d346dcf118728bf8e11598dae5c2296611874e0c Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Tue, 24 Oct 2023 14:46:33 -0700 Subject: [PATCH 15/20] bump timeout --- tests/integration/test_feedback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index 12c827b0064..89a19f6a385 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -50,7 +50,7 @@ def test_feedback_event_with_processing( 42, extra={"config": {"features": ["organizations:user-feedback-ingest"]}} ) - _events_consumer = events_consumer(timeout=5) + _events_consumer = events_consumer(timeout=20) feedback = generate_feedback_sdk_event() relay.send_user_feedback(42, feedback) @@ -115,7 +115,7 @@ def test_feedback_events_without_processing(mini_sentry, relay_chain): relay.send_user_feedback(42, replay_item) - envelope = mini_sentry.captured_events.get(timeout=5) + envelope = mini_sentry.captured_events.get(timeout=20) assert len(envelope.items) == 1 userfeedback = envelope.items[0] From ab93f41a4d38d0e2edbaac2d7e8f054fe54adbae Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Tue, 24 Oct 2023 16:05:16 -0700 Subject: [PATCH 16/20] change the deserialized name to feedback --- relay-base-schema/src/data_category.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index d596ab2d0d8..a52d972337e 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -114,7 +114,7 @@ impl DataCategory { Self::Monitor => "monitor", Self::Span => "span", Self::MonitorSeat => "monitor_seat", - Self::UserReportV2 => "user_report_v2", + Self::UserReportV2 => "feedback", Self::Unknown => "unknown", } } From 307be2f54e5d32c4c180bfaf812a6803a78c1d64 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Wed, 25 Oct 2023 10:06:02 -0700 Subject: [PATCH 17/20] Fix python changelog --- py/CHANGELOG.md | 645 ++++++++++++++++-------------------------------- 1 file changed, 207 insertions(+), 438 deletions(-) diff --git a/py/CHANGELOG.md b/py/CHANGELOG.md index 64ab24315dc..411abad1a65 100644 --- a/py/CHANGELOG.md +++ b/py/CHANGELOG.md @@ -2,64 +2,45 @@ ## Unreleased -- Add `scraping_attempts` field to the event schema. - ([#2575](https://github.com/getsentry/relay/pull/2575)) -- Drop events starting or ending before January 1, 1970 UTC. - ([#2613](https://github.com/getsentry/relay/pull/2613)) -- Remove event spans starting or ending before January 1, 1970 UTC. - ([#2627](https://github.com/getsentry/relay/pull/2627)) -- Remove event breadcrumbs dating before January 1, 1970 UTC. - ([#2635](https://github.com/getsentry/relay/pull/2635)) -- Add `locale` ,`screen_width_pixels`, `screen_height_pixels`, and `uuid` to the - device context. ([#2640](https://github.com/getsentry/relay/pull/2640)) -- Add feedback DataCategory. - ([#2604](https://github.com/getsentry/relay/pull/2604)) +- Add `scraping_attempts` field to the event schema. ([#2575](https://github.com/getsentry/relay/pull/2575)) +- Drop events starting or ending before January 1, 1970 UTC. ([#2613](https://github.com/getsentry/relay/pull/2613)) +- Remove event spans starting or ending before January 1, 1970 UTC. ([#2627](https://github.com/getsentry/relay/pull/2627)) +- Remove event breadcrumbs dating before January 1, 1970 UTC. ([#2635](https://github.com/getsentry/relay/pull/2635)) +- Add `locale` ,`screen_width_pixels`, `screen_height_pixels`, and `uuid` to the device context. ([#2640](https://github.com/getsentry/relay/pull/2640)) +- Add feedback DataCategory. ([#2604](https://github.com/getsentry/relay/pull/2604)) ## 0.8.31 -- Add `Reservoir` variant to `SamplingRule`. - ([#2550](https://github.com/getsentry/relay/pull/2550)) -- Remove dynamic sampling ABI. - ([#2515](https://github.com/getsentry/relay/pull/2515)) -- Scrub span descriptions with encoded data images. - ([#2560](https://github.com/getsentry/relay/pull/2560)) +- Add `Reservoir` variant to `SamplingRule`. ([#2550](https://github.com/getsentry/relay/pull/2550)) +- Remove dynamic sampling ABI. ([#2515](https://github.com/getsentry/relay/pull/2515)) +- Scrub span descriptions with encoded data images. ([#2560](https://github.com/getsentry/relay/pull/2560)) ## 0.8.30 -- Filter out exceptions originating in Safari extensions. - ([#2408](https://github.com/getsentry/relay/pull/2408)) -- Add a `DataCategory` for monitor seats (crons). - ([#2480](https://github.com/getsentry/relay/pull/2480)) -- Expose global config normalization function. - ([#2498](https://github.com/getsentry/relay/pull/2498)) +- Filter out exceptions originating in Safari extensions. ([#2408](https://github.com/getsentry/relay/pull/2408)) +- Add a `DataCategory` for monitor seats (crons). ([#2480](https://github.com/getsentry/relay/pull/2480)) +- Expose global config normalization function. ([#2498](https://github.com/getsentry/relay/pull/2498)) ## 0.8.29 -- Add rudimentary Mypy setup. - ([#2384](https://github.com/getsentry/relay/pull/2384)) +- Add rudimentary Mypy setup. ([#2384](https://github.com/getsentry/relay/pull/2384)) ## 0.8.28 This release requires Python 3.8 or later. -- Add the configuration protocol for generic metrics extraction. - ([#2252](https://github.com/getsentry/relay/pull/2252)) -- Modernize python syntax. - ([#2264](https://github.com/getsentry/relay/pull/2264)) +- Add the configuration protocol for generic metrics extraction. ([#2252](https://github.com/getsentry/relay/pull/2252)) +- Modernize python syntax. ([#2264](https://github.com/getsentry/relay/pull/2264)) ## 0.8.27 -- Add is_enabled flag on transaction filter. - ([#2251](https://github.com/getsentry/relay/pull/2251)) +- Add is_enabled flag on transaction filter. ([#2251](https://github.com/getsentry/relay/pull/2251)) ## 0.8.26 -- Add filter based on transaction names. - ([#2118](https://github.com/getsentry/relay/pull/2118)) -- Add `lock` attribute to the frame protocol. - ([#2171](https://github.com/getsentry/relay/pull/2171)) -- Add trace context to CheckIns. - ([#2241](https://github.com/getsentry/relay/pull/2241)) +- Add filter based on transaction names. ([#2118](https://github.com/getsentry/relay/pull/2118)) +- Add `lock` attribute to the frame protocol. ([#2171](https://github.com/getsentry/relay/pull/2171)) +- Add trace context to CheckIns. ([#2241](https://github.com/getsentry/relay/pull/2241)) ## 0.8.25 @@ -69,345 +50,217 @@ This release requires Python 3.8 or later. ## 0.8.24 -- Compile regexes in PII config validation. - ([#2152](https://github.com/getsentry/relay/pull/2152)) +- Compile regexes in PII config validation. ([#2152](https://github.com/getsentry/relay/pull/2152)) ## 0.8.23 -- Add `txNameReady` flag to project config. - ([#2128](https://github.com/getsentry/relay/pull/2128)) +- Add `txNameReady` flag to project config. ([#2128](https://github.com/getsentry/relay/pull/2128)) ## 0.8.22 -- Store `geo.subdivision` of the end user location. - ([#2058](https://github.com/getsentry/relay/pull/2058)) -- Scrub URLs in span descriptions. - ([#2095](https://github.com/getsentry/relay/pull/2095)) -- Add new FFI function for running dynamic sampling. - ([#2091](https://github.com/getsentry/relay/pull/2091)) +- Store `geo.subdivision` of the end user location. ([#2058](https://github.com/getsentry/relay/pull/2058)) +- Scrub URLs in span descriptions. ([#2095](https://github.com/getsentry/relay/pull/2095)) +- Add new FFI function for running dynamic sampling. ([#2091](https://github.com/getsentry/relay/pull/2091)) ## 0.8.21 -- Add a data category for indexed profiles. - ([#2051](https://github.com/getsentry/relay/pull/2051)) +- Add a data category for indexed profiles. ([#2051](https://github.com/getsentry/relay/pull/2051)) ## 0.8.20 -- Add `thread.state` field to protocol. - ([#1896](https://github.com/getsentry/relay/pull/1896)) -- Smart trim loggers for Java platforms. - ([#1941](https://github.com/getsentry/relay/pull/1941)) -- Perform PII scrubbing on meta's original_value field. - ([#1892](https://github.com/getsentry/relay/pull/1892)) -- PII scrub `span.data` by default. - ([#1953](https://github.com/getsentry/relay/pull/1953)) -- Scrub sensitive cookies. - ([#1951](https://github.com/getsentry/relay/pull/1951)) -- Changes how device class is determined for iPhone devices. Instead of checking - processor frequency, the device model is mapped to a device class. - ([#1970](https://github.com/getsentry/relay/pull/1970)) -- Don't sanitize transactions if no clustering rules exist and no UUIDs were - scrubbed. ([#1976](https://github.com/getsentry/relay/pull/1976)) -- Add iPad support for device.class synthesis in light normalization. - ([#2008](https://github.com/getsentry/relay/pull/2008)) -- Include unknown feature flags in project config when serializing it. - ([#2040](https://github.com/getsentry/relay/pull/2040)) +- Add `thread.state` field to protocol. ([#1896](https://github.com/getsentry/relay/pull/1896)) +- Smart trim loggers for Java platforms. ([#1941](https://github.com/getsentry/relay/pull/1941)) +- Perform PII scrubbing on meta's original_value field. ([#1892](https://github.com/getsentry/relay/pull/1892)) +- PII scrub `span.data` by default. ([#1953](https://github.com/getsentry/relay/pull/1953)) +- Scrub sensitive cookies. ([#1951](https://github.com/getsentry/relay/pull/1951)) +- Changes how device class is determined for iPhone devices. Instead of checking processor frequency, the device model is mapped to a device class. ([#1970](https://github.com/getsentry/relay/pull/1970)) +- Don't sanitize transactions if no clustering rules exist and no UUIDs were scrubbed. ([#1976](https://github.com/getsentry/relay/pull/1976)) +- Add iPad support for device.class synthesis in light normalization. ([#2008](https://github.com/getsentry/relay/pull/2008)) +- Include unknown feature flags in project config when serializing it. ([#2040](https://github.com/getsentry/relay/pull/2040)) ## 0.8.19 -- Protocol validation for source map image type. - ([#1869](https://github.com/getsentry/relay/pull/1869)) -- Scrub `span.data.http.query` with default scrubbers. - ([#1889](https://github.com/getsentry/relay/pull/1889)) -- Add Cloud Resource context. - ([#1854](https://github.com/getsentry/relay/pull/1854)) -- Add a `DataCategory` for monitors (crons). - ([#1886](https://github.com/getsentry/relay/pull/1886)) +- Protocol validation for source map image type. ([#1869](https://github.com/getsentry/relay/pull/1869)) +- Scrub `span.data.http.query` with default scrubbers. ([#1889](https://github.com/getsentry/relay/pull/1889)) +- Add Cloud Resource context. ([#1854](https://github.com/getsentry/relay/pull/1854)) +- Add a `DataCategory` for monitors (crons). ([#1886](https://github.com/getsentry/relay/pull/1886)) ## 0.8.18 -- Add `instruction_addr_adjustment` field to `RawStacktrace`. - ([#1716](https://github.com/getsentry/relay/pull/1716)) -- Make sure to scrub all the fields with PII. If the fields contain an object, - the entire object will be removed. - ([#1789](https://github.com/getsentry/relay/pull/1789)) -- Add new schema for dynamic sampling rules. - ([#1790](https://github.com/getsentry/relay/pull/1790) -- Keep meta for removed custom measurements. - ([#1815](https://github.com/getsentry/relay/pull/1815)) +- Add `instruction_addr_adjustment` field to `RawStacktrace`. ([#1716](https://github.com/getsentry/relay/pull/1716)) +- Make sure to scrub all the fields with PII. If the fields contain an object, the entire object will be removed. ([#1789](https://github.com/getsentry/relay/pull/1789)) +- Add new schema for dynamic sampling rules. ([#1790](https://github.com/getsentry/relay/pull/1790) +- Keep meta for removed custom measurements. ([#1815](https://github.com/getsentry/relay/pull/1815)) ## 0.8.17 -- Add utility function for matching CODEOWNER paths against a stacktrace - filepath ([#1746](https://github.com/getsentry/relay/pull/1746)) +- Add utility function for matching CODEOWNER paths against a stacktrace filepath ([#1746](https://github.com/getsentry/relay/pull/1746)) ## 0.8.16 -- The minimum required Python version is now 3.8. This release does not contain - known breaking changes for Python 3.7, but we no longer guarantee - compatibility. -- Add support for decaying functions in dynamic sampling rules. - ([#1692](https://github.com/getsentry/relay/pull/1692)) -- Add Profiling Context to event protocol. - ([#1748](https://github.com/getsentry/relay/pull/1748)) -- Add OpenTelemetry Context to event protocol. - ([#1617](https://github.com/getsentry/relay/pull/1617)) -- Add `app.in_foreground` and `thread.main` flag to event protocol. - ([#1578](https://github.com/getsentry/relay/pull/1578)) -- Scrub all fields with IP addresses rather than only known IP address fields. - ([#1725](https://github.com/getsentry/relay/pull/1725)) -- Disallow `-` in measurement and breakdown names. These items are converted to - metrics, which do not allow `-` in their name. - ([#1571](https://github.com/getsentry/relay/pull/1571)) -- Validate the distribution name in the event. - ([#1556](https://github.com/getsentry/relay/pull/1556)) -- Use correct meta object for logentry in light normalization. - ([#1577](https://github.com/getsentry/relay/pull/1577)) +- The minimum required Python version is now 3.8. This release does not contain known breaking changes for Python 3.7, but we no longer guarantee compatibility. +- Add support for decaying functions in dynamic sampling rules. ([#1692](https://github.com/getsentry/relay/pull/1692)) +- Add Profiling Context to event protocol. ([#1748](https://github.com/getsentry/relay/pull/1748)) +- Add OpenTelemetry Context to event protocol. ([#1617](https://github.com/getsentry/relay/pull/1617)) +- Add `app.in_foreground` and `thread.main` flag to event protocol. ([#1578](https://github.com/getsentry/relay/pull/1578)) +- Scrub all fields with IP addresses rather than only known IP address fields. ([#1725](https://github.com/getsentry/relay/pull/1725)) +- Disallow `-` in measurement and breakdown names. These items are converted to metrics, which do not allow `-` in their name. ([#1571](https://github.com/getsentry/relay/pull/1571)) +- Validate the distribution name in the event. ([#1556](https://github.com/getsentry/relay/pull/1556)) +- Use correct meta object for logentry in light normalization. ([#1577](https://github.com/getsentry/relay/pull/1577)) ## 0.8.15 -- Restore correct behavior when `is_renormalize` is specified on - `normalize_event`. ([#1548](https://github.com/getsentry/relay/pull/1548)) +- Restore correct behavior when `is_renormalize` is specified on `normalize_event`. ([#1548](https://github.com/getsentry/relay/pull/1548)) ## 0.8.14 [YANKED] -**Warning:** This release contains a regression. Please update to a more recent -version. - -- Add `transaction_info` to event payloads, including the transaction's source - and internal original transaction name. - ([#1330](https://github.com/getsentry/relay/pull/1330)) -- Add user-agent parsing to replays processor. - ([#1420](https://github.com/getsentry/relay/pull/1420)) -- `convert_datascrubbing_config` will now return an error string when conversion - fails on big regexes. ([#1474](https://github.com/getsentry/relay/pull/1474)) -- `relay_pii_strip_event` now treats any key containing `token` as a password. - ([#1527](https://github.com/getsentry/relay/pull/1527)) -- Add data category for indexed transactions. This will come to represent stored - transactions, while the existing category will represent transaction metrics. - ([#1535](https://github.com/getsentry/relay/pull/1535)) +**Warning:** This release contains a regression. Please update to a more recent version. + +- Add `transaction_info` to event payloads, including the transaction's source and internal original transaction name. ([#1330](https://github.com/getsentry/relay/pull/1330)) +- Add user-agent parsing to replays processor. ([#1420](https://github.com/getsentry/relay/pull/1420)) +- `convert_datascrubbing_config` will now return an error string when conversion fails on big regexes. ([#1474](https://github.com/getsentry/relay/pull/1474)) +- `relay_pii_strip_event` now treats any key containing `token` as a password. ([#1527](https://github.com/getsentry/relay/pull/1527)) +- Add data category for indexed transactions. This will come to represent stored transactions, while the existing category will represent transaction metrics. ([#1535](https://github.com/getsentry/relay/pull/1535)) ## 0.8.13 -- Add a data category constant for Replays. - ([#1239](https://github.com/getsentry/relay/pull/1239)) -- Add data category constant for processed transactions, encompassing all - transactions that have been received and sent through dynamic sampling as well - as metrics extraction. ([#1306](https://github.com/getsentry/relay/pull/1306)) -- Extend trace sampling protocol to deal with flat user data. - ([#1318](https://github.com/getsentry/relay/pull/1318)) +- Add a data category constant for Replays. ([#1239](https://github.com/getsentry/relay/pull/1239)) +- Add data category constant for processed transactions, encompassing all transactions that have been received and sent through dynamic sampling as well as metrics extraction. ([#1306](https://github.com/getsentry/relay/pull/1306)) +- Extend trace sampling protocol to deal with flat user data. ([#1318](https://github.com/getsentry/relay/pull/1318)) ## 0.8.12 -- Fix missing profile data category in the python library of 0.8.11 by - regenerating the header for C-bindings. - ([#1278](https://github.com/getsentry/relay/pull/1278)) +- Fix missing profile data category in the python library of 0.8.11 by regenerating the header for C-bindings. ([#1278](https://github.com/getsentry/relay/pull/1278)) ## 0.8.11 -- Add protocol support for custom units on transaction measurements. - ([#1256](https://github.com/getsentry/relay/pull/1256)) -- Add a profile data category and count profiles in an envelope to apply rate - limits. ([#1259](https://github.com/getsentry/relay/pull/1259)) +- Add protocol support for custom units on transaction measurements. ([#1256](https://github.com/getsentry/relay/pull/1256)) +- Add a profile data category and count profiles in an envelope to apply rate limits. ([#1259](https://github.com/getsentry/relay/pull/1259)) ## 0.8.10 -- Map Windows version from raw_description to version name (XP, Vista, 11, ...). - ([#1219](https://github.com/getsentry/relay/pull/1219)) -- Update rust-minidump to 0.10.0 - ([#1209](https://github.com/getsentry/relay/pull/1209)) +- Map Windows version from raw_description to version name (XP, Vista, 11, ...). ([#1219](https://github.com/getsentry/relay/pull/1219)) +- Update rust-minidump to 0.10.0 ([#1209](https://github.com/getsentry/relay/pull/1209)) - Update regex to 1.5.5 ([#1207](https://github.com/getsentry/relay/pull/1207)) -- Update the user agent parser (uap-core Feb 2020 to Nov 2021). - ([#1143](https://github.com/getsentry/relay/pull/1143), - [#1145](https://github.com/getsentry/relay/pull/1145)) -- Improvements to Unity OS context parsing - ([#1150](https://github.com/getsentry/relay/pull/1150)) +- Update the user agent parser (uap-core Feb 2020 to Nov 2021). ([#1143](https://github.com/getsentry/relay/pull/1143), [#1145](https://github.com/getsentry/relay/pull/1145)) +- Improvements to Unity OS context parsing ([#1150](https://github.com/getsentry/relay/pull/1150)) ## 0.8.9 -- Add the exclusive time of a span. - ([#1061](https://github.com/getsentry/relay/pull/1061)) -- Add `ingest_path` to the event schema, capturing Relays that processed this - event. ([#1062](https://github.com/getsentry/relay/pull/1062)) -- Retrieve OS Context for Unity Events. - ([#1072](https://github.com/getsentry/relay/pull/1072)) -- Protocol support for client reports. - ([#1081](https://github.com/getsentry/relay/pull/1081)) -- Add the exclusive time of the transaction's root span. - ([#1083](https://github.com/getsentry/relay/pull/1083)) -- Build and publish binary wheels for `arm64` / `aarch64` on macOS and Linux. - ([#1100](https://github.com/getsentry/relay/pull/1100)) +- Add the exclusive time of a span. ([#1061](https://github.com/getsentry/relay/pull/1061)) +- Add `ingest_path` to the event schema, capturing Relays that processed this event. ([#1062](https://github.com/getsentry/relay/pull/1062)) +- Retrieve OS Context for Unity Events. ([#1072](https://github.com/getsentry/relay/pull/1072)) +- Protocol support for client reports. ([#1081](https://github.com/getsentry/relay/pull/1081)) +- Add the exclusive time of the transaction's root span. ([#1083](https://github.com/getsentry/relay/pull/1083)) +- Build and publish binary wheels for `arm64` / `aarch64` on macOS and Linux. ([#1100](https://github.com/getsentry/relay/pull/1100)) ## 0.8.8 -- Bump release parser to 1.3.0 and add ability to compare versions. - ([#1038](https://github.com/getsentry/relay/pull/1038)) +- Bump release parser to 1.3.0 and add ability to compare versions. ([#1038](https://github.com/getsentry/relay/pull/1038)) ## 1.1.4 - 2021-07-14 [YANKED] -- Bump release parser to 1.1.4. - ([#1031](https://github.com/getsentry/relay/pull/1031)) +- Bump release parser to 1.1.4. ([#1031](https://github.com/getsentry/relay/pull/1031)) ## 0.8.7 -- Bump release parser to 1.0.0. - ([#1013](https://github.com/getsentry/relay/pull/1013)) +- Bump release parser to 1.0.0. ([#1013](https://github.com/getsentry/relay/pull/1013)) ## 0.8.6 -- Add back `breadcrumb.event_id`. - ([#977](https://github.com/getsentry/relay/pull/977)) -- Add `frame.stack_start` for chained async stack traces. - ([#981](https://github.com/getsentry/relay/pull/981)) -- Fix roundtrip error when PII selector starts with number. - ([#982](https://github.com/getsentry/relay/pull/982)) -- Explicitly declare reprocessing context. - ([#1009](https://github.com/getsentry/relay/pull/1009)) -- Add `safari-web-extension` to known browser extensions. - ([#1011](https://github.com/getsentry/relay/pull/1011)) +- Add back `breadcrumb.event_id`. ([#977](https://github.com/getsentry/relay/pull/977)) +- Add `frame.stack_start` for chained async stack traces. ([#981](https://github.com/getsentry/relay/pull/981)) +- Fix roundtrip error when PII selector starts with number. ([#982](https://github.com/getsentry/relay/pull/982)) +- Explicitly declare reprocessing context. ([#1009](https://github.com/getsentry/relay/pull/1009)) +- Add `safari-web-extension` to known browser extensions. ([#1011](https://github.com/getsentry/relay/pull/1011)) ## 0.8.5 -- Skip serializing some null values in frames interface. - ([#944](https://github.com/getsentry/relay/pull/944)) -- Make request url scrubbable. - ([#955](https://github.com/getsentry/relay/pull/955)) +- Skip serializing some null values in frames interface. ([#944](https://github.com/getsentry/relay/pull/944)) +- Make request url scrubbable. ([#955](https://github.com/getsentry/relay/pull/955)) ## 0.8.4 -- Deny backslashes in release names. - ([#904](https://github.com/getsentry/relay/pull/904)) -- Remove dependencies on `openssl` and `zlib`. - ([#914](https://github.com/getsentry/relay/pull/914)) -- Fix `and` and `or` operators in PII selectors on fields declaring `pii=maybe`. - ([#932](https://github.com/getsentry/relay/pull/932)) -- Enable PII stripping on `user.username`. - ([#935](https://github.com/getsentry/relay/pull/935)) -- Expose dynamic rule condition validation. - ([#941](https://github.com/getsentry/relay/pull/941)) +- Deny backslashes in release names. ([#904](https://github.com/getsentry/relay/pull/904)) +- Remove dependencies on `openssl` and `zlib`. ([#914](https://github.com/getsentry/relay/pull/914)) +- Fix `and` and `or` operators in PII selectors on fields declaring `pii=maybe`. ([#932](https://github.com/getsentry/relay/pull/932)) +- Enable PII stripping on `user.username`. ([#935](https://github.com/getsentry/relay/pull/935)) +- Expose dynamic rule condition validation. ([#941](https://github.com/getsentry/relay/pull/941)) ## 0.8.3 -- Add NSError to mechanism. - ([#925](https://github.com/getsentry/relay/pull/925)) -- Add snapshot to the stack trace interface. - ([#927](https://github.com/getsentry/relay/pull/927)) +- Add NSError to mechanism. ([#925](https://github.com/getsentry/relay/pull/925)) +- Add snapshot to the stack trace interface. ([#927](https://github.com/getsentry/relay/pull/927)) - Drop python 2.7 support. ([#929](https://github.com/getsentry/relay/pull/929)) ## 0.8.2 -- Fix compile errors in the sdist with Rust 1.47 and later. - ([#801](https://github.com/getsentry/relay/pull/801)) -- Emit more useful normalization meta data for invalid tags. - ([#808](https://github.com/getsentry/relay/pull/808)) -- Internal refactoring such that validating of characters in tags no longer uses - regexes internally. ([#814](https://github.com/getsentry/relay/pull/814)) -- Normalize `breadcrumb.ty` into `breadcrumb.type` for broken Python SDK - versions. ([#824](https://github.com/getsentry/relay/pull/824)) -- Emit event errors and normalization errors for unknown breadcrumb keys. - ([#824](https://github.com/getsentry/relay/pull/824)) -- Make `$error.value` `pii=true`. - ([#837](https://github.com/getsentry/relay/pull/837)) -- Add protocol support for WASM. - ([#852](https://github.com/getsentry/relay/pull/852)) -- Add missing fields for Expect-CT reports. - ([#865](https://github.com/getsentry/relay/pull/865)) -- Support more directives in CSP reports, such as `block-all-mixed-content` and - `require-trusted-types-for`. - ([#876](https://github.com/getsentry/relay/pull/876)) -- Fix a long-standing bug where log messages were not addressible as `$string`. - ([#882](https://github.com/getsentry/relay/pull/882)) -- Use manylinux2010 to build releases instead of manylinux1 to fix issues with - newer Rust. ([#917](https://github.com/getsentry/relay/pull/917)) +- Fix compile errors in the sdist with Rust 1.47 and later. ([#801](https://github.com/getsentry/relay/pull/801)) +- Emit more useful normalization meta data for invalid tags. ([#808](https://github.com/getsentry/relay/pull/808)) +- Internal refactoring such that validating of characters in tags no longer uses regexes internally. ([#814](https://github.com/getsentry/relay/pull/814)) +- Normalize `breadcrumb.ty` into `breadcrumb.type` for broken Python SDK versions. ([#824](https://github.com/getsentry/relay/pull/824)) +- Emit event errors and normalization errors for unknown breadcrumb keys. ([#824](https://github.com/getsentry/relay/pull/824)) +- Make `$error.value` `pii=true`. ([#837](https://github.com/getsentry/relay/pull/837)) +- Add protocol support for WASM. ([#852](https://github.com/getsentry/relay/pull/852)) +- Add missing fields for Expect-CT reports. ([#865](https://github.com/getsentry/relay/pull/865)) +- Support more directives in CSP reports, such as `block-all-mixed-content` and `require-trusted-types-for`. ([#876](https://github.com/getsentry/relay/pull/876)) +- Fix a long-standing bug where log messages were not addressible as `$string`. ([#882](https://github.com/getsentry/relay/pull/882)) +- Use manylinux2010 to build releases instead of manylinux1 to fix issues with newer Rust. ([#917](https://github.com/getsentry/relay/pull/917)) ## 0.8.1 -- Add support for measurement ingestion. - ([#724](https://github.com/getsentry/relay/pull/724), - [#785](https://github.com/getsentry/relay/pull/785)) +- Add support for measurement ingestion. ([#724](https://github.com/getsentry/relay/pull/724), [#785](https://github.com/getsentry/relay/pull/785)) ## 0.8.0 -- Fix issue where `$span` would not be recognized in Advanced Data Scrubbing. - ([#781](https://github.com/getsentry/relay/pull/781)) -- Require macOS 10.15.0 or newer for the macOS wheel after moving to GitHub - Actions. ([#780](https://github.com/getsentry/relay/pull/780)) +- Fix issue where `$span` would not be recognized in Advanced Data Scrubbing. ([#781](https://github.com/getsentry/relay/pull/781)) +- Require macOS 10.15.0 or newer for the macOS wheel after moving to GitHub Actions. ([#780](https://github.com/getsentry/relay/pull/780)) ## 0.7.0 -- In PII configs, all options on hash and mask redactions (replacement - characters, ignored characters, hash algorithm/key) are removed. If they still - exist in the configuration, they are ignored. - ([#760](https://github.com/getsentry/relay/pull/760)) -- Rename to the library target to `relay_cabi` and add documentation. - ([#763](https://github.com/getsentry/relay/pull/763)) -- Update FFI bindings with a new implementation for error handling. - ([#766](https://github.com/getsentry/relay/pull/766)) -- **Breaking:** Delete `scrub_event` function from public API. - ([#773](https://github.com/getsentry/relay/pull/773)) -- Add Relay version version to challenge response. - ([#758](https://github.com/getsentry/relay/pull/758)) +- In PII configs, all options on hash and mask redactions (replacement characters, ignored characters, hash algorithm/key) are removed. If they still exist in the configuration, they are ignored. ([#760](https://github.com/getsentry/relay/pull/760)) +- Rename to the library target to `relay_cabi` and add documentation. ([#763](https://github.com/getsentry/relay/pull/763)) +- Update FFI bindings with a new implementation for error handling. ([#766](https://github.com/getsentry/relay/pull/766)) +- **Breaking:** Delete `scrub_event` function from public API. ([#773](https://github.com/getsentry/relay/pull/773)) +- Add Relay version version to challenge response. ([#758](https://github.com/getsentry/relay/pull/758)) ## 0.6.1 - Removed deprecated `pii_selectors_from_event`. -- Return `UnpackErrorSignatureExpired` from `validate_register_response` when - the timestamp is too old. +- Return `UnpackErrorSignatureExpired` from `validate_register_response` when the timestamp is too old. ## 0.6.0 -- Updates the authentication mechanism by introducing a signed register state. - Signatures of `create_register_challenge` and `validate_register_response` now - take a mandatory `secret` parameter, and the public key is encoded into the - state. ([#743](https://github.com/getsentry/relay/pull/743)) +- Updates the authentication mechanism by introducing a signed register state. Signatures of `create_register_challenge` and `validate_register_response` now take a mandatory `secret` parameter, and the public key is encoded into the state. ([#743](https://github.com/getsentry/relay/pull/743)) ## 0.5.13 -_Note: This accidentally got released as 0.15.13 as well, which has since been -yanked._ +_Note: This accidentally got released as 0.15.13 as well, which has since been yanked._ -- Fix Python 3 incompatibilities in Relay authentication helpers. - ([#712](https://github.com/getsentry/relay/pull/712)) +- Fix Python 3 incompatibilities in Relay authentication helpers. ([#712](https://github.com/getsentry/relay/pull/712)) ## 0.5.12 -- Always create a spans array for transactions in normalization. - ([#667](https://github.com/getsentry/relay/pull/667)) -- Retain the full span description in transaction events instead of trimming it. - ([#674](https://github.com/getsentry/relay/pull/674)) -- Move hashed user ip addresses to `user.id` to avoid invalid IPs going into - Snuba. ([#692](https://github.com/getsentry/relay/pull/692)) -- Add `is_version_supported` to check for Relay compatibility during - authentication. ([#697](https://github.com/getsentry/relay/pull/697)) +- Always create a spans array for transactions in normalization. ([#667](https://github.com/getsentry/relay/pull/667)) +- Retain the full span description in transaction events instead of trimming it. ([#674](https://github.com/getsentry/relay/pull/674)) +- Move hashed user ip addresses to `user.id` to avoid invalid IPs going into Snuba. ([#692](https://github.com/getsentry/relay/pull/692)) +- Add `is_version_supported` to check for Relay compatibility during authentication. ([#697](https://github.com/getsentry/relay/pull/697)) ## 0.5.11 -- Add SpanStatus to span struct. - ([#603](https://github.com/getsentry/relay/pull/603)) -- Apply clock drift correction for timestamps that are too far in the past or - future. This fixes a bug where broken transaction timestamps would lead to - negative durations. ([#634](https://github.com/getsentry/relay/pull/634), - [#654](https://github.com/getsentry/relay/pull/654)) -- Add missing .NET 4.8 version mapping for runtime context normalization. - ([#642](https://github.com/getsentry/relay/pull/642)) -- Expose `DataCategory` and `SpanStatus` via the C-ABI to Python for code - sharing. ([#651](https://github.com/getsentry/relay/pull/651)) +- Add SpanStatus to span struct. ([#603](https://github.com/getsentry/relay/pull/603)) +- Apply clock drift correction for timestamps that are too far in the past or future. This fixes a bug where broken transaction timestamps would lead to negative durations. ([#634](https://github.com/getsentry/relay/pull/634), [#654](https://github.com/getsentry/relay/pull/654)) +- Add missing .NET 4.8 version mapping for runtime context normalization. ([#642](https://github.com/getsentry/relay/pull/642)) +- Expose `DataCategory` and `SpanStatus` via the C-ABI to Python for code sharing. ([#651](https://github.com/getsentry/relay/pull/651)) ## 0.5.10 -- Set default transaction name - ([#576](https://github.com/getsentry/relay/pull/576)) -- Apply clock drift correction based on received_at - ([#580](https://github.com/getsentry/relay/pull/580), - [#582](https://github.com/getsentry/relay/pull/582)) -- Add AWS Security Scanner to web crawlers - ([#577](https://github.com/getsentry/relay/pull/577)) -- Do not default transactions to level error - ([#585](https://github.com/getsentry/relay/pull/585)) -- Update `sentry-release-parser` to 0.6.0 - ([#590](https://github.com/getsentry/relay/pull/590)) -- Add schema for success metrics (failed and errored processing) - ([#593](https://github.com/getsentry/relay/pull/593)) +- Set default transaction name ([#576](https://github.com/getsentry/relay/pull/576)) +- Apply clock drift correction based on received_at ([#580](https://github.com/getsentry/relay/pull/580), [#582](https://github.com/getsentry/relay/pull/582)) +- Add AWS Security Scanner to web crawlers ([#577](https://github.com/getsentry/relay/pull/577)) +- Do not default transactions to level error ([#585](https://github.com/getsentry/relay/pull/585)) +- Update `sentry-release-parser` to 0.6.0 ([#590](https://github.com/getsentry/relay/pull/590)) +- Add schema for success metrics (failed and errored processing) ([#593](https://github.com/getsentry/relay/pull/593)) ## 0.5.9 @@ -423,17 +276,12 @@ yanked._ ## 0.5.7 - Release is now a required attribute for session data. -- `unknown` can now be used in place of `unknown_error` for span statuses. A - future release will change the canonical format from `unknown_error` to - `unknown`. +- `unknown` can now be used in place of `unknown_error` for span statuses. A future release will change the canonical format from `unknown_error` to `unknown`. ## 0.5.6 -- Minor updates to PII processing: Aliases for value types (`$error` instead of - `$exception` to be in sync with Discover column naming) and adding a default - for replace-redactions. -- It is now valid to send transactions and spans without `op` set, in which case - a default value will be inserted. +- Minor updates to PII processing: Aliases for value types (`$error` instead of `$exception` to be in sync with Discover column naming) and adding a default for replace-redactions. +- It is now valid to send transactions and spans without `op` set, in which case a default value will be inserted. ## 0.5.5 @@ -449,34 +297,25 @@ yanked._ ## 0.5.3 -- Validate release names during event ingestion - ([#479](https://github.com/getsentry/relay/pull/479)) -- Add browser extension filter - ([#470](https://github.com/getsentry/relay/pull/470)) -- Add `pii=maybe`, a new kind of event schema field that can only be scrubbed if - explicitly addressed. +- Validate release names during event ingestion ([#479](https://github.com/getsentry/relay/pull/479)) +- Add browser extension filter ([#470](https://github.com/getsentry/relay/pull/470)) +- Add `pii=maybe`, a new kind of event schema field that can only be scrubbed if explicitly addressed. - Add way to scrub filepaths in a way that does not break processing. -- Add missing errors for JSON parsing and release validation - ([#478](https://github.com/getsentry/relay/pull/478)) -- Expose more datascrubbing utils - ([#464](https://github.com/getsentry/relay/pull/464)) +- Add missing errors for JSON parsing and release validation ([#478](https://github.com/getsentry/relay/pull/478)) +- Expose more datascrubbing utils ([#464](https://github.com/getsentry/relay/pull/464)) ## 0.5.2 -- Misc bugfixes in PII processor. Those bugs do not affect the legacy data - scrubber exposed in Python. +- Misc bugfixes in PII processor. Those bugs do not affect the legacy data scrubber exposed in Python. - Polishing documentation around PII configuration format. - Signal codes in mach mechanism are no longer required. ## 0.5.1 -- Bump xcode version from 7.3 to 9.4, dropping wheel support for some older OS X - versions. +- Bump xcode version from 7.3 to 9.4, dropping wheel support for some older OS X versions. - New function `validate_pii_config`. -- Fix a bug in the PII processor that would always remove the entire string on - `pattern` rules. -- Ability to correct some clock drift and wrong system time in transaction - events. +- Fix a bug in the PII processor that would always remove the entire string on `pattern` rules. +- Ability to correct some clock drift and wrong system time in transaction events. ## 0.5.0 @@ -499,12 +338,9 @@ yanked._ ## 0.4.63 -- Fix a bug where glob-matching in filters did not behave correctly when the - to-be-matched string contained newlines. -- Add `moz-extension:` as scheme for browser extensions (filtering out Firefox - addons). -- Raise a dedicated Python exception type for invalid transaction events. Also - do not report that error to Sentry from Relay. +- Fix a bug where glob-matching in filters did not behave correctly when the to-be-matched string contained newlines. +- Add `moz-extension:` as scheme for browser extensions (filtering out Firefox addons). +- Raise a dedicated Python exception type for invalid transaction events. Also do not report that error to Sentry from Relay. ## 0.4.62 @@ -515,34 +351,25 @@ yanked._ ## 0.4.61 -- Add `thread.errored` attribute - ([#306](https://github.com/getsentry/relay/pull/306)). +- Add `thread.errored` attribute ([#306](https://github.com/getsentry/relay/pull/306)). ## 0.4.60 -- License is now BSL instead of MIT - ([#301](https://github.com/getsentry/relay/pull/301)). -- Transaction events with negative duration are now rejected - ([#291](https://github.com/getsentry/relay/pull/291)). +- License is now BSL instead of MIT ([#301](https://github.com/getsentry/relay/pull/301)). +- Transaction events with negative duration are now rejected ([#291](https://github.com/getsentry/relay/pull/291)). - Fix a panic when normalizing certain dates. ## 0.4.59 -- Fix: Normalize legacy stacktrace attributes - ([#292](https://github.com/getsentry/relay/pull/292)) -- Fix: Validate platform attributes - ([#294](https://github.com/getsentry/relay/pull/294)) +- Fix: Normalize legacy stacktrace attributes ([#292](https://github.com/getsentry/relay/pull/292)) +- Fix: Validate platform attributes ([#294](https://github.com/getsentry/relay/pull/294)) ## 0.4.58 -- Expose globbing code from Relay to Python - ([#288](https://github.com/getsentry/relay/pull/288)) -- Normalize before datascrubbing - ([#290](https://github.com/getsentry/relay/pull/290)) -- Selectively log internal errors to stderr - ([#285](https://github.com/getsentry/relay/pull/285)) -- Do not ignore `process_value` result in `scrub_event` - ([#284](https://github.com/getsentry/relay/pull/284)) +- Expose globbing code from Relay to Python ([#288](https://github.com/getsentry/relay/pull/288)) +- Normalize before datascrubbing ([#290](https://github.com/getsentry/relay/pull/290)) +- Selectively log internal errors to stderr ([#285](https://github.com/getsentry/relay/pull/285)) +- Do not ignore `process_value` result in `scrub_event` ([#284](https://github.com/getsentry/relay/pull/284)) ## 0.4.57 @@ -583,8 +410,7 @@ yanked._ ## 0.4.48 -- Fix various bugs in the datascrubber and PII processing code to get closer to - behavior of the Python implementation. +- Fix various bugs in the datascrubber and PII processing code to get closer to behavior of the Python implementation. ## 0.4.47 @@ -592,8 +418,7 @@ yanked._ ## 0.4.46 -- Resolved a regression in IP address normalization. The new behavior is closer - to a line-by-line port of the old Python code. +- Resolved a regression in IP address normalization. The new behavior is closer to a line-by-line port of the old Python code. ## 0.4.45 @@ -601,14 +426,12 @@ yanked._ ## 0.4.44 -- Only take the user IP address from the store request's IP for certain - platforms. This restores the behavior of the old Python code. +- Only take the user IP address from the store request's IP for certain platforms. This restores the behavior of the old Python code. ## 0.4.43 - Bump size of breadcrumbs -- Workaround for an issue where we would not parse OS information from User - Agent when SDK had already sent OS information. +- Workaround for an issue where we would not parse OS information from User Agent when SDK had already sent OS information. ## 0.4.42 @@ -663,8 +486,7 @@ yanked._ ## 0.4.30 -- Make exception messages/values larger to allow for foreign stacktrace data to - be attached. +- Make exception messages/values larger to allow for foreign stacktrace data to be attached. ## 0.4.29 @@ -676,8 +498,7 @@ yanked._ ## 0.4.27 -- Increase frame vars size again! Byte size was fine, but max depth was way too - small. +- Increase frame vars size again! Byte size was fine, but max depth was way too small. ## 0.4.26 @@ -689,55 +510,43 @@ yanked._ ## 0.4.24 -- Reject non-http/https `help_urls` in exception mechanisms - ([#192](https://github.com/getsentry/relay/pull/192)) +- Reject non-http/https `help_urls` in exception mechanisms ([#192](https://github.com/getsentry/relay/pull/192)) ## 0.4.23 -- Add basic truncation to event meta to prevent payload size from spiralling out - of control. +- Add basic truncation to event meta to prevent payload size from spiralling out of control. ## 0.4.22 -- Improve the grouping protocol config - ([#190](https://github.com/getsentry/relay/pull/190)) +- Improve the grouping protocol config ([#190](https://github.com/getsentry/relay/pull/190)) ## 0.4.21 -- Add new debug image variants - ([#188](https://github.com/getsentry/relay/pull/188)) -- Trim release and environment - ([#184](https://github.com/getsentry/relay/pull/184)) +- Add new debug image variants ([#188](https://github.com/getsentry/relay/pull/188)) +- Trim release and environment ([#184](https://github.com/getsentry/relay/pull/184)) ## 0.4.20 -- Alias level critical as fatal - ([#182](https://github.com/getsentry/relay/pull/182)) -- Add device properties from Java/.NET SDKs - ([#185](https://github.com/getsentry/relay/pull/185)) -- Add `lang` to frame and stacktrace - ([#186](https://github.com/getsentry/relay/pull/186)) +- Alias level critical as fatal ([#182](https://github.com/getsentry/relay/pull/182)) +- Add device properties from Java/.NET SDKs ([#185](https://github.com/getsentry/relay/pull/185)) +- Add `lang` to frame and stacktrace ([#186](https://github.com/getsentry/relay/pull/186)) ## 0.4.19 -- Add mode for renormalization - ([#181](https://github.com/getsentry/relay/pull/181)) +- Add mode for renormalization ([#181](https://github.com/getsentry/relay/pull/181)) ## 0.4.18 -- Restore the original behavior with supporting very large values in extra - ([#180](https://github.com/getsentry/relay/pull/180)) +- Restore the original behavior with supporting very large values in extra ([#180](https://github.com/getsentry/relay/pull/180)) ## 0.4.17 -- Add untyped spans for tracing - ([#179](https://github.com/getsentry/relay/pull/179)) +- Add untyped spans for tracing ([#179](https://github.com/getsentry/relay/pull/179)) - Add the `none` event type ## 0.4.16 -- Add support for synthetic mechanism markers - ([#177](https://github.com/getsentry/relay/pull/177)) +- Add support for synthetic mechanism markers ([#177](https://github.com/getsentry/relay/pull/177)) ## 0.4.15 @@ -747,19 +556,16 @@ yanked._ - Rename `template_info` to template - Add two new untyped context types: `gpu`, `monitors` -- Rewrite `derive(ProcessValue)` to use `Structure::each_variant` - ([#175](https://github.com/getsentry/relay/pull/175)) +- Rewrite `derive(ProcessValue)` to use `Structure::each_variant` ([#175](https://github.com/getsentry/relay/pull/175)) ## 0.4.13 -- Allow arrays as header values - ([#176](https://github.com/getsentry/relay/pull/176)) +- Allow arrays as header values ([#176](https://github.com/getsentry/relay/pull/176)) - Swap `python-json-read-adapter` to git dependency ## 0.4.12 -- Run json.dumps at max depth in databag - ([#174](https://github.com/getsentry/relay/pull/174)) +- Run json.dumps at max depth in databag ([#174](https://github.com/getsentry/relay/pull/174)) ## 0.4.11 @@ -771,14 +577,12 @@ yanked._ ## 0.4.9 -- Trim containers one level before max_depth - ([#173](https://github.com/getsentry/relay/pull/173)) +- Trim containers one level before max_depth ([#173](https://github.com/getsentry/relay/pull/173)) - Unconditionally overwrite `received` ## 0.4.8 -- Fix bugs in array trimming, more code comments - ([#172](https://github.com/getsentry/relay/pull/172)) +- Fix bugs in array trimming, more code comments ([#172](https://github.com/getsentry/relay/pull/172)) ## 0.4.7 @@ -786,15 +590,12 @@ yanked._ ## 0.4.6 -- Reject exceptions with empty type and value - ([#170](https://github.com/getsentry/relay/pull/170)) -- Validate remote_addr before backfilling into user - ([#171](https://github.com/getsentry/relay/pull/171)) +- Reject exceptions with empty type and value ([#170](https://github.com/getsentry/relay/pull/170)) +- Validate remote_addr before backfilling into user ([#171](https://github.com/getsentry/relay/pull/171)) ## 0.4.5 -- Adjust limits to fit values into db - ([#167](https://github.com/getsentry/relay/pull/167)) +- Adjust limits to fit values into db ([#167](https://github.com/getsentry/relay/pull/167)) - Environment is 64 chars in db - Normalize macOS ([#168](https://github.com/getsentry/relay/pull/168)) - Use right maxchars for `transaction`, `dist`, `release` @@ -802,67 +603,46 @@ yanked._ ## 0.4.4 -- Reject unknown debug images - ([#163](https://github.com/getsentry/relay/pull/163)) -- Include original_value in `Meta::eq` - ([#164](https://github.com/getsentry/relay/pull/164)) -- Emit correct expectations for common types - ([#162](https://github.com/getsentry/relay/pull/162)) -- Permit invalid emails in user interface - ([#161](https://github.com/getsentry/relay/pull/161)) +- Reject unknown debug images ([#163](https://github.com/getsentry/relay/pull/163)) +- Include original_value in `Meta::eq` ([#164](https://github.com/getsentry/relay/pull/164)) +- Emit correct expectations for common types ([#162](https://github.com/getsentry/relay/pull/162)) +- Permit invalid emails in user interface ([#161](https://github.com/getsentry/relay/pull/161)) - Drop long tags correctly ([#165](https://github.com/getsentry/relay/pull/165)) -- Do not skip null values in pairlists - ([#166](https://github.com/getsentry/relay/pull/166)) +- Do not skip null values in pairlists ([#166](https://github.com/getsentry/relay/pull/166)) ## 0.4.3 -- Fix broken sdk_info parsing - ([#156](https://github.com/getsentry/relay/pull/156)) -- Add basic snapshot tests for normalize and event parsing - ([#154](https://github.com/getsentry/relay/pull/154)) +- Fix broken sdk_info parsing ([#156](https://github.com/getsentry/relay/pull/156)) +- Add basic snapshot tests for normalize and event parsing ([#154](https://github.com/getsentry/relay/pull/154)) - Context trimming ([#153](https://github.com/getsentry/relay/pull/153)) -- Coerce PHP frame vars array to object - ([#159](https://github.com/getsentry/relay/pull/159)) +- Coerce PHP frame vars array to object ([#159](https://github.com/getsentry/relay/pull/159)) ## 0.4.2 - Remove content-type params - Dont attempt to free() if python is shutting down -- Improve cookie header normalizations - ([#151](https://github.com/getsentry/relay/pull/151)) -- Implement LogEntry formatting - ([#152](https://github.com/getsentry/relay/pull/152)) +- Improve cookie header normalizations ([#151](https://github.com/getsentry/relay/pull/151)) +- Implement LogEntry formatting ([#152](https://github.com/getsentry/relay/pull/152)) - Deduplicate tags ([#155](https://github.com/getsentry/relay/pull/155)) - Treat empty paths like no paths in frame normalization - Remove cookie header when explicit cookies are given ## 0.4.1 -- Do not remove empty cookies or headers - ([#138](https://github.com/getsentry/relay/pull/138)) -- Skip more empty containers - ([#139](https://github.com/getsentry/relay/pull/139)) -- Make `request.header` values lenient - ([#145](https://github.com/getsentry/relay/pull/145)) -- Remove internal tags when backfilling - ([#146](https://github.com/getsentry/relay/pull/146)) -- Implement advanced context normalization - ([#140](https://github.com/getsentry/relay/pull/140)) -- Retain additional properties in contexts - ([#141](https://github.com/getsentry/relay/pull/141)) -- Implement very lenient URL parsing - ([#147](https://github.com/getsentry/relay/pull/147)) -- Do not require breadcrumb timestamps - ([#144](https://github.com/getsentry/relay/pull/144)) -- Reject tags with long keys - ([#149](https://github.com/getsentry/relay/pull/149)) +- Do not remove empty cookies or headers ([#138](https://github.com/getsentry/relay/pull/138)) +- Skip more empty containers ([#139](https://github.com/getsentry/relay/pull/139)) +- Make `request.header` values lenient ([#145](https://github.com/getsentry/relay/pull/145)) +- Remove internal tags when backfilling ([#146](https://github.com/getsentry/relay/pull/146)) +- Implement advanced context normalization ([#140](https://github.com/getsentry/relay/pull/140)) +- Retain additional properties in contexts ([#141](https://github.com/getsentry/relay/pull/141)) +- Implement very lenient URL parsing ([#147](https://github.com/getsentry/relay/pull/147)) +- Do not require breadcrumb timestamps ([#144](https://github.com/getsentry/relay/pull/144)) +- Reject tags with long keys ([#149](https://github.com/getsentry/relay/pull/149)) ## 0.4.0 -- Add new options max_concurrent_events - ([#134](https://github.com/getsentry/relay/pull/134)) -- Dont move stacktrace before normalizing it - ([#135](https://github.com/getsentry/relay/pull/135)) +- Add new options max_concurrent_events ([#134](https://github.com/getsentry/relay/pull/134)) +- Dont move stacktrace before normalizing it ([#135](https://github.com/getsentry/relay/pull/135)) - Fix broken repr and crash when shutting down python - Port slim_frame_data ([#137](https://github.com/getsentry/relay/pull/137)) - Special treatment for ellipsis in URLs @@ -870,29 +650,20 @@ yanked._ ## 0.3.0 -- Changed PII stripping rule format to permit path selectors when applying - rules. This means that now `$string` refers to strings for instance and - `user.id` refers to the `id` field in the `user` attribute of the event. - Temporarily support for old rules is retained. +- Changed PII stripping rule format to permit path selectors when applying rules. This means that now `$string` refers to strings for instance and `user.id` refers to the `id` field in the `user` attribute of the event. Temporarily support for old rules is retained. ## 0.2.7 -- Minor fixes to be closer to Python. Ability to disable trimming of objects, - arrays and strings. +- Minor fixes to be closer to Python. Ability to disable trimming of objects, arrays and strings. ## 0.2.6 -- Fix bug where PII stripping would remove containers without leaving any - metadata about the retraction. +- Fix bug where PII stripping would remove containers without leaving any metadata about the retraction. - Fix bug where old `redactPair` rules would stop working. ## 0.2.5 -- Rewrite of PII stripping logic. This brings potentially breaking changes to - the semantics of PII configs. Most importantly field types such as - `"freeform"` and `"databag"` are gone, right now there is only `"container"` - and `"text"`. All old field types should have become an alias for `"text"`, - but take extra care in ensuring your PII rules still work. +- Rewrite of PII stripping logic. This brings potentially breaking changes to the semantics of PII configs. Most importantly field types such as `"freeform"` and `"databag"` are gone, right now there is only `"container"` and `"text"`. All old field types should have become an alias for `"text"`, but take extra care in ensuring your PII rules still work. - Minor fixes to be closer to Python. @@ -907,8 +678,7 @@ yanked._ ## 0.2.2 - Fix segfault when trying to process contexts. -- Fix trimming state "leaking" between interfaces, leading to excessive - trimming. +- Fix trimming state "leaking" between interfaces, leading to excessive trimming. - Don't serialize empty arrays and objects (with a few exceptions). ## 0.2.1 @@ -917,8 +687,7 @@ yanked._ ## 0.2.0 -- Updated event processing: Events from older SDKs are now supported. Also, - we've fixed some bugs along the line. +- Updated event processing: Events from older SDKs are now supported. Also, we've fixed some bugs along the line. - Introduced full support for PII stripping. ## 0.1.3 From 4b738926bbd506f084898745ffee3b28eb9735e0 Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Wed, 25 Oct 2023 10:11:59 -0700 Subject: [PATCH 18/20] use feedback as serialized value --- relay-event-schema/src/protocol/contexts/mod.rs | 1 + relay-event-schema/src/protocol/contexts/user_report_v2.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/relay-event-schema/src/protocol/contexts/mod.rs b/relay-event-schema/src/protocol/contexts/mod.rs index fdc176f63e7..919050efd22 100644 --- a/relay-event-schema/src/protocol/contexts/mod.rs +++ b/relay-event-schema/src/protocol/contexts/mod.rs @@ -69,6 +69,7 @@ pub enum Context { /// Information related to Replay. Replay(Box), /// Information related to User Report V2. TODO:(jferg): rename to UserFeedbackContext + #[metastructure(tag = "feedback")] UserReportV2(Box), /// Information related to Monitors feature. Monitor(Box), diff --git a/relay-event-schema/src/protocol/contexts/user_report_v2.rs b/relay-event-schema/src/protocol/contexts/user_report_v2.rs index c3a6b39f5e9..323bdcb7f68 100644 --- a/relay-event-schema/src/protocol/contexts/user_report_v2.rs +++ b/relay-event-schema/src/protocol/contexts/user_report_v2.rs @@ -64,7 +64,7 @@ mod tests { let json = r#"{ "message": "test message", "contact_email": "test@test.com", - "type": "userreportv2" + "type": "feedback" }"#; let context = Annotated::new(Context::UserReportV2(Box::new(UserReportV2Context { message: Annotated::new("test message".to_string()), From 95b21766744a942dd7233e441ab11c3d92ebd7ae Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Fri, 27 Oct 2023 12:35:29 -0700 Subject: [PATCH 19/20] fix integration test --- tests/integration/test_feedback.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_feedback.py b/tests/integration/test_feedback.py index 89a19f6a385..124baa22d4f 100644 --- a/tests/integration/test_feedback.py +++ b/tests/integration/test_feedback.py @@ -28,7 +28,7 @@ def generate_feedback_sdk_event(): "feedback": { "message": "test message", "contact_email": "test@example.com", - "type": "userreportv2", + "type": "feedback", }, "trace": { "trace_id": "4C79F60C11214EB38604F4AE0781BFB2", @@ -97,7 +97,7 @@ def test_feedback_event_with_processing( "feedback": { "message": "test message", "contact_email": "test@example.com", - "type": "userreportv2", + "type": "feedback", }, } From efe98703b8191df057a20da32294c91163e877fa Mon Sep 17 00:00:00 2001 From: Joshua Ferge Date: Mon, 30 Oct 2023 10:19:12 -0700 Subject: [PATCH 20/20] add feedback to from_name in DataCategory --- relay-base-schema/src/data_category.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/relay-base-schema/src/data_category.rs b/relay-base-schema/src/data_category.rs index a52d972337e..22684186411 100644 --- a/relay-base-schema/src/data_category.rs +++ b/relay-base-schema/src/data_category.rs @@ -92,6 +92,7 @@ impl DataCategory { "monitor" => Self::Monitor, "span" => Self::Span, "monitor_seat" => Self::MonitorSeat, + "feedback" => Self::UserReportV2, _ => Self::Unknown, } }