-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(analytics): Transform analytics events for TET-825 #95205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Transform event classes to use @analytics.eventclass decorator - Transform analytics.record calls to use event class instances - Update imports as needed Closes TET-825
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Not sure why the same logic returns a different result now that is not in a hook anymore. However, the color ended up being white after moving this to the theme and this PR fixes it.
Move the `OnboardingStep` type out of the `Step` component file as the type is also used in other components and a general building block of our docs structure. Move `TabbedCodeSnippet` from `step.tsx` into `onboardingCodeSnippet.tsx` since it is just a utility wrapper for it and also is used in a multitude of places that do not use the `Step` component. - closes [TET-841: Move general onboarding doc types out of step component file](https://linear.app/getsentry/issue/TET-841/move-general-onboarding-doc-types-out-of-step-component-file)
The arcade for the profiling onboarding got blocked by our CSP. This PR streamlines the embed URL to use the same format as the other arcades.
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
project_id: str | ||
event_id: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these be ints?
actor_id: str | None = None | ||
id: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - are these ints or str?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Database ID Typing Inconsistency
Several ID fields in EmailNotificationSent
(organization_id
, project_id
, actor_id
, user_id
, group_id
, id
, alert_id
) and NotificationSettingsUpdated
(actor_id
, id
) are incorrectly typed as str
(or str | None
for actor_id
). These database IDs should be int
(or int | None
), consistent with Sentry's typical ID patterns and other analytics events. This type mismatch can cause type checking failures, compatibility issues, and runtime errors when integer values are passed.
src/sentry/analytics/events/notifications_settings_updated.py#L6-L8
target_type: str | |
actor_id: str | None = None | |
id: str |
src/sentry/mail/analytics.py#L6-L16
sentry/src/sentry/mail/analytics.py
Lines 6 to 16 in baf5a77
class EmailNotificationSent(analytics.Event): | |
organization_id: str | |
project_id: str | None = None | |
category: str | |
actor_id: str | None = None | |
user_id: str | None = None | |
group_id: str | None = None | |
id: str | |
actor_type: str | |
notification_uuid: str | |
alert_id: str | None = None |
Bug: String Type Mismatch for Integer ID Fields
The project_id
and event_id
fields in GroupingParameterizationExperiment
are typed as str
but should be int
. As database IDs, these are consistently integers in Sentry. This type mismatch can lead to runtime errors or compatibility issues when these analytics events are used with integer ID values.
src/sentry/analytics/events/grouping_parameterization_experiment.py#L6-L8
experiment_name: str | |
project_id: str | |
event_id: str |
Was this report helpful? Give feedback by reacting with 👍 or 👎
Closes TET-825