Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new Culture context to the Relay event schema, which allows capturing cultural and locale-specific information from events. This addition supports the Sentry JavaScript SDK's need to track culture-related information (as referenced in the linked issue and PR).
Changes:
- Added a new
CultureContextstruct with fields for calendar, display_name, locale, is_24_hour_format, and timezone - Integrated the Culture context into the Context enum and module system
- Added comprehensive test coverage for the new context
- Updated CHANGELOG to document the feature addition
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| relay-event-schema/src/protocol/contexts/culture.rs | New file defining the CultureContext struct with fields for cultural/locale information, trait implementations, and roundtrip tests |
| relay-event-schema/src/protocol/contexts/mod.rs | Added Culture module import/export and Culture variant to the Context enum |
| CHANGELOG.md | Added entry documenting the Culture context feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| /// The timezone of the locale. | ||
| /// | ||
| /// For example, `Europe/Vienna`. |
There was a problem hiding this comment.
The timezone field should be marked with #[metastructure(pii = "maybe")] annotation. This field can potentially contain personally identifiable information similar to how the timezone field in DeviceContext is marked (see relay-event-schema/src/protocol/contexts/device.rs:118-120). Timezone information can reveal user location.
| /// For example, `Europe/Vienna`. | |
| /// For example, `Europe/Vienna`. | |
| #[metastructure(pii = "maybe")] |
|
|
||
| /// Human-readable name of the culture. | ||
| /// | ||
| /// For example, `English (United States)`. |
There was a problem hiding this comment.
The display_name field should be marked with #[metastructure(pii = "maybe")] annotation. This field contains human-readable locale information (e.g., "English (United States)") which can reveal user location and preferences, similar to other locale-related fields that are marked as potentially containing PII.
| /// For example, `English (United States)`. | |
| /// For example, `English (United States)`. | |
| #[metastructure(pii = "maybe")] |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Adds Culture context to the schema definitions
relevant to getsentry/sentry-javascript#18801 | PR (getsentry/sentry-javascript#19148)