diff --git a/CHANGELOG.md b/CHANGELOG.md index c7d3e104df..8b2afa449b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ **Features**: +- Add `view_names` to `AppContext` ([#2344](https://github.com/getsentry/relay/pull/2344)) - Tag keys in error events and transaction events can now be up to `200` ASCII characters long. Before, tag keys were limited to 32 characters. ([#2453](https://github.com/getsentry/relay/pull/2453)) **Bug Fixes**: @@ -115,7 +116,7 @@ - Use different error message for empty strings in schema processing. ([#2151](https://github.com/getsentry/relay/pull/2151)) - Filter irrelevant webkit-issues. ([#2088](https://github.com/getsentry/relay/pull/2088)) -- Relay now supports a simplified cron check-in API. ([#2153](https://github.com/getsentry/relay/pull/2153)) +- Relay now supports a simplified cron check-in API. ([#2153](https://github.com/getsentry/relay/pull/2153)) ## 23.5.1 diff --git a/relay-event-schema/src/protocol/contexts/app.rs b/relay-event-schema/src/protocol/contexts/app.rs index 568240c1a7..2811881ac8 100644 --- a/relay-event-schema/src/protocol/contexts/app.rs +++ b/relay-event-schema/src/protocol/contexts/app.rs @@ -43,6 +43,10 @@ pub struct AppContext { /// A flag indicating whether the app is in foreground or not. An app is in foreground when it's visible to the user. pub in_foreground: Annotated, + /// The names of the currently visible views. + #[metastructure(skip_serialization = "empty")] + pub view_names: Annotated>>, + /// Additional arbitrary fields for forwards compatibility. #[metastructure(additional_properties, retain = "true", pii = "maybe")] pub other: Object, @@ -96,6 +100,10 @@ mod tests { "app_build": "100001", "app_memory": 22883948, "in_foreground": true, + "view_names": [ + "FooViewController", + "BarViewController" + ], "other": "value", "type": "app" }"#; @@ -109,6 +117,10 @@ mod tests { app_build: Annotated::new("100001".to_string().into()), app_memory: Annotated::new(22883948), in_foreground: Annotated::new(true), + view_names: Annotated::new(vec![ + Annotated::new("FooViewController".to_string()), + Annotated::new("BarViewController".to_string()), + ]), other: { let mut map = Object::new(); map.insert( diff --git a/relay-server/tests/snapshots/test_fixtures__event_schema.snap b/relay-server/tests/snapshots/test_fixtures__event_schema.snap index a48917b976..a20c258a92 100644 --- a/relay-server/tests/snapshots/test_fixtures__event_schema.snap +++ b/relay-server/tests/snapshots/test_fixtures__event_schema.snap @@ -478,6 +478,20 @@ expression: "relay_event_schema::protocol::event_json_schema()" "boolean", "null" ] + }, + "view_names": { + "description": " The names of the currently visible views.", + "default": null, + "type": [ + "array", + "null" + ], + "items": { + "type": [ + "string", + "null" + ] + } } }, "additionalProperties": false