-
Notifications
You must be signed in to change notification settings - Fork 4
Replays Self-Serve Bulk Delete System #5
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: replays-delete-vulnerable
Are you sure you want to change the base?
Conversation
This validates both the [Working Draft](https://www.w3.org/TR/reporting-1/#concept-reports) and the [Editor's Draft](https://w3c.github.io/reporting/#concept-reports) formats. Fixes [ID-730 - Accept current and upcoming data model](https://linear.app/getsentry/issue/ID-730/accept-current-and-upcoming-data-model).
…o 'low' (#93927)" This reverts commit 8d04522. Co-authored-by: roaga <[email protected]>
Missed in the initial commit, leading to some relevant logs being unannotated.
We have had a few tasks get killed at 10% rollout.
Also add a test, so that this doesn't happen again
Fixes DE-129 and DE-156 --------- Co-authored-by: Cursor Agent <[email protected]>
These transitions should be matching
…` (#93946) Use `project_id` on the replay record instead of the URL (where it does not always exist). --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
Also fixed `replay.view_html` -> `replay.view-html` --------- Co-authored-by: Michelle Zhang <[email protected]>
…948) gets `npx @typescript/native-preview` passing again
This adds mode for all things tracing. This encompasses transactions/metrics/spans. Taken from https://github.com/getsentry/sentry/blob/feeaf393deeca8b97675bff23039c6320270aab5/src/sentry/runner/commands/devserver.py#L370
The conditions associated with a DCG can change over time, and it's good if we can be completely confident that they're consistent within a given task execution.
This is unused and most regex experiments have required broader changes to ensure that regexes are evaluated in a specific order (ex: traceparent). Removing this for now to simplify the code and very slightly improve runtime performance.
From some testing (on feedback lists of all different lengths), this prompt seems to work better. It doesn't write overly long sentences and also does a better job at "summarizing" versus just mentioning a few specific topics and leaving out others.
Just remove a couple custom Flex* classes in favor of the Flex primitive
This has been killed a few times. Refs SENTRY-42M7
…n table (#93892) <!-- Describe your PR here. --> [ticket](https://linear.app/getsentry/issue/ID-156/grouping-info-remove-type-field-from-ui) The Type field in the Grouping Info section of the issue details page was redundant. This removes the Type row from all variant types while keeping the underlying data structure intact. before  after 
### Changes Related to this PR: getsentry/sentry#93810. This is part 1 of the change, which is pulling out the new component and just adding it to the repo. Also includes some simplification of the logic in the base component. Part 2 will be replacing tables in widgets. ### Before/After There is no UI change as the table is not being used yet. There is a new story page for the component.
…93943) to prevent this issue from becoming too noisy, add a noise config
Unfortunately, 'event_data' went from being the variable for current event context to being the complete parsed data from Redis, and we continued logging it per group. That's more data than we should be logging even arguably once, let alone per group.
Co-authored-by: Abdullah Khan <[email protected]>
Adds some simple analytics to our endpoint so we can begin building a dashboard in Amplitude.
Previously, explore supported multiple y axis per chart, so each visualize supported multiple y axis. That functionality has since been removed for simplicity so update the types here to match. Keep in mind that saved queries still store them as an array so when serializing/deserializing, we still need to treat it as an array.
We'll need the `useGetTraceItemAttributeKeys` hook in other places so refactoring it so that it can exported.
- getsentry/sentry#93894 removed usage - getsentry/sentry-options-automator#4243 removed the last override
When the max segment ID is null the process fails. We should exit early since if there aren't any segments to delete there's nothing to do.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||
User description
PR #5
PR Type
Enhancement, Bug fix, Tests, Configuration changes
Description
Major changes across multiple systems:
Replay system improvements: Added null segment ID handling in replay deletion, updated bulk delete tests, and integrated error context into breadcrumb analysis
Browser reporting validation: Refactored API validation using DRF serializers with improved error handling and field constraints
PR comment formatting: Updated GitHub and GitLab integrations to use markdown links with environment context instead of culprits, with centralized template utilities
Workflow engine enhancements: Added detector owner field support, optimized slow conditions queries, and refactored logger initialization
Autofix tuning defaults: Changed default automation tuning from
"low"to"off"across constants, project options, and testsAnalytics and tracking: Added preprod artifact analytics events, timeline zoom tracking for replays, and webhook delivery task processing deadlines
Frontend refactoring: Migrated from custom flex components to
Flexcomponent across multiple views for consistencyVisualization architecture: Refactored explore visualizations from multi-axis to single-axis model with corresponding hook and utility updates
Feedback summarization: Added AI-generated feedback summary component with refined prompt constraints and new hook for fetching summaries
Database and migrations: Disabled problematic migrations 0917 and 0920 with reference to corrected version 0921, added DB query injection noise configuration
Snuba and logging: Added equations parameter to ourlogs timeseries queries, added logs dataset test coverage for top N events
Trace attribute handling: New hooks for fetching trace item attribute keys and values with filtering capabilities
Table widget visualization: New component for rendering tabular data with customizable columns and cell renderers
Parameterization cleanup: Removed unused regex experiment class and simplified experiment execution logic
Devservices configuration: Added snuba-metrics service and Kafka consumer services for subscription results
Diagram Walkthrough
File Walkthrough
12 files
test_browser_reporting_collector.py
Browser reporting collector validation test expansiontests/sentry/api/endpoints/test_browser_reporting_collector.py
DEPRECATION_REPORT,INTERVENTION_REPORT) to module level for reusabilityassert_invalid_report_datahelper method to validate errorresponses
mocking
types, URLs, timestamps, attempts, and mixed field constraints
test_project_replay_summarize_breadcrumbs.py
Replay breadcrumb summarization error context integrationtests/sentry/replays/test_project_replay_summarize_breadcrumbs.py
@requires_snubadecorator andstore_replaysmethod for replaydata storage
test_get_with_error,test_get_with_error_context_disabled) to validate error contexthandling
test_get_request_datato includeErrorEventobjects and verifychronological ordering of logs and errors
utilities
test_organization_events_stats.py
Top N events stats test coverage for logs datasettests/snuba/api/endpoints/test_organization_events_stats.py
OrganizationEventsStatsTopNEventstoOrganizationEventsStatsTopNEventsSpansOrganizationEventsStatsTopNEventsLogswithOurLogTestCasemixin for logs dataset testingtest_simple_top_eventsmethod to validate top events queryon logs dataset
defaultdictandOurLogTestCasetest_organization_detector_index.py
Detector creation tests with owner field validationtests/sentry/workflow_engine/endpoints/test_organization_detector_index.py
test_valid_creation_with_owner,test_valid_creation_with_team_owner,test_invalid_ownererror handling for invalid owners
test_organization_detector_details.py
Detector update tests with owner field modificationstests/sentry/workflow_engine/endpoints/test_organization_detector_details.py
test_update_owner_to_user,test_update_owner_to_team,test_update_clear_ownerand proper serialization
test_delayed_workflow.py
Delayed workflow test updates for slow conditions parametertests/sentry/workflow_engine/processors/test_delayed_workflow.py
get_slow_conditions_for_groupsfunctiontest_get_condition_query_groupsto compute and passdcg_to_slow_conditionsparameterGetGroupsToFireTestCasesetUp to precomputedcg_to_slow_conditionsget_groups_to_firecalls to includedcg_to_slow_conditionsparameter
test_parameterization.py
Parameterization test cleanup after regex experiment removaltests/sentry/grouping/test_parameterization.py
ParameterizationRegexExperimentclassParameterizerandUniqueIdExperimenttest_project_details.py
Project details test autofix automation tuning default updatetests/sentry/api/endpoints/test_project_details.py
"low"to"off"intest assertions
"off"as the default valuetest_project.py
Project serializer test autofix automation tuning defaulttests/sentry/api/serializers/test_project.py
"low"to"off"for default autofixautomation tuning
"off"as the default valuetest_delete_replays_bulk.py
Replay bulk delete test null segment ID updatetests/sentry/replays/tasks/test_delete_replays_bulk.py
max_segment_idvalue from0toNonein test datatableWidgetVisualization.spec.tsx
Tests for table widget visualization componentstatic/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.spec.tsx
TableWidgetVisualizationcomponentformatting, and custom renderers
useGetTraceItemAttributeValues.spec.tsx
Update tests for renamed attribute values hookstatic/app/views/explore/hooks/useGetTraceItemAttributeValues.spec.tsx
useGetTraceItemAttributeValueshookattributeKeyparameter from hook calls33 files
project_replay_summarize_breadcrumbs.py
Error event integration into replay breadcrumb analysissrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py
ErrorEventTypedDict to represent error details with id,title, message, timestamp, and category
fetch_error_detailsfunction to retrieve error information fromnodestore using error IDs
get_request_dataand createdgen_request_datagenerator tomerge breadcrumbs and errors chronologically
analyze_recording_segmentsto accept and process error eventsalongside breadcrumb data
disable flag via query parameter
test_pr_comment.py
GitHub PR comment formatting with environment contexttests/sentry/integrations/github/tasks/test_pr_comment.py
environmentfield to test event data for multiple test casesmarkdown links with environment info
culpritsvariable extraction and updated assertion logic touse new template format
- ‼️ **title** \culprit\to* ‼️[**title**](url) in \environment\browser_reporting_collector.py
Browser reporting API validation refactoring with serializerssrc/sentry/issues/endpoints/browser_reporting_collector.py
BrowserReportdataclass withBrowserReportSerializerforvalidation using DRF serializers
BrowserReportTypeLiteral toBROWSER_REPORT_TYPESlistconstant
constraints
objects with validation error details
test_pr_comment.py
GitLab PR comment formatting with environment contexttests/sentry/integrations/gitlab/tasks/test_pr_comment.py
environmentfield to test event data for multiple test casesenvironment info
culpritsvariable and updated assertion logic for new templateformat
links with optional environment
delayed_workflow.py
Delayed workflow slow conditions optimization and loggingsrc/sentry/workflow_engine/processors/delayed_workflow.py
dcg_to_slow_conditionsparameter toget_condition_query_groupsand
get_groups_to_firefunctionsget_slow_conditions_for_groupscall to main processing functionto avoid redundant queries
event_datatoworkflow_event_datainfire_actions_for_groups logging
detector.py
Detector owner field support in workflow engine validatorssrc/sentry/workflow_engine/endpoints/validators/base/detector.py
ActorFieldimport for owner field validationownerfield toBaseDetectorTypeValidatorserializer as optionalnullable field
updatemethod to set owner_user_idor owner_team_id based on actor type
createmethod to properlyinitialize detector with owner information
feedback_summaries.py
Feedback summarization prompt refinement with constraintssrc/sentry/feedback/usecases/feedback_summaries.py
statements
entries
limit (2 sentences maximum)
dashes
commit_context.py
PR comment template utilities with title truncation and environmentsrc/sentry/integrations/source_code_management/commit_context.py
ISSUE_TITLE_MAX_LENGTHconstant andMERGED_PR_SINGLE_ISSUE_TEMPLATEconstant_truncate_titlestatic method to limit title length withellipsis
get_environment_infomethod to extract environment fromrecommended event
get_merged_pr_single_issue_templatestatic method forconsistent issue formatting
integration.py
GitHub integration PR comment template refactoringsrc/sentry/integrations/github/integration.py
MERGED_PR_SINGLE_ISSUE_TEMPLATEconstant definitionget_comment_bodyto useget_merged_pr_single_issue_templatemethod
subtitle(culprit) toenvironmentinfo
integration.py
GitLab integration PR comment template refactoringsrc/sentry/integrations/gitlab/integration.py
MERGED_PR_SINGLE_ISSUE_TEMPLATEconstant definitionget_comment_bodyto useget_merged_pr_single_issue_templatemethod
subtitle(culprit) toenvironmentinfo
organization_preprod_artifact_assemble.py
Preprod artifact assemble endpoint analytics trackingsrc/sentry/preprod/api/endpoints/organization_preprod_artifact_assemble.py
preprod_artifact.api.assemblewithorganization, project, and user IDs
workflow.py
Workflow engine logger initialization refactoringsrc/sentry/workflow_engine/processors/workflow.py
log_context.get_logger(__name__)ourlogs.py
Ourlogs top events timeseries query equations parametersrc/sentry/snuba/ourlogs.py
equationsparameter torun_top_events_timeseries_queryfunction
equationsparameter through torpc_dataset_common.run_top_events_timeseries_queryanalytics.py
Preprod artifact analytics event definitionsrc/sentry/preprod/analytics.py
PreprodArtifactApiAssembleEventpreprod_artifact.api.assembleuser_id attributes
toolbarVisualize.tsx
Refactor visualization model from multi-axis to single-axisstatic/app/views/explore/toolbar/toolbarVisualize.tsx
FragmentimportVisualizeconstructor to accept singleyAxisstring instead ofarray
deleteOverlayto remove entire visualization group insteadof individual y-axes
canDeletelogic to check visualization count instead of totaly-axes
tableWidgetVisualization.tsx
New table widget visualization componentstatic/app/views/dashboards/widgets/tableWidget/tableWidgetVisualization.tsx
cell renderers
renderers
layouts
useGetTraceItemAttributeKeys.tsx
New hook for fetching trace item attribute keysstatic/app/views/explore/hooks/useGetTraceItemAttributeKeys.tsx
sentry.message.*
chart.tsx
Add feature-flagged table widget visualizationstatic/app/views/dashboards/widgetCard/chart.tsx
TableWidgetVisualizationcomponentuse-table-widget-visualizationTableWidgetVisualizationor falls back toStyledSimpleTableChartdefaultTableCellRenderers.tsx
Default cell renderers for table widgetstatic/app/views/dashboards/widgets/tableWidget/defaultTableCellRenderers.tsx
cells
visualizes.tsx
Refactor Visualize model to single-axis architecturestatic/app/views/explore/contexts/pageParamsContext/visualizes.tsx
Visualizeclass to use singleyAxisstring instead ofyAxesarray
axis
toJSON()to wrap singleyAxisin array for backwardcompatibility
fromJSON()to return array ofVisualizeobjects, one pery-axis
getVisualizesFromLocation()to create separate visualizationsper y-axis
timeAndScrubberGrid.tsx
Add analytics tracking for timeline zoom actionsstatic/app/components/replays/timeAndScrubberGrid.tsx
useCallbackimport andtrackAnalyticstrackinghandleZoomOutandhandleZoomIncallbacks with analyticstracking
replay.timeline.zoom-inandreplay.timeline.zoom-outeventsuseAnalytics.tsx
Update analytics to work with single-axis visualizationsstatic/app/views/explore/hooks/useAnalytics.tsx
dedupeArrayimport and usagetoJSON()on visualizescomputeConfidenceandcomputeEmptyBucketsto use singleyAxisinstead of array
times.tsx
Improve text overflow handling and use Flex componentstatic/app/components/group/times.tsx
FlexandTextOverflowcomponent importsFlexWrapperwithFlex align="center"TimeSincecomponents withTextOverflowfor better texthandling
IconClockto usesize="xs"instead oflegacySizemin-widthtoStyledIconClockfor proper alignmentindex.tsx
Update charts to work with single-axis visualizationsstatic/app/views/explore/charts/index.tsx
dedupeArrayimportgetChartInfoto accept singleyAxisstring instead of arrayvisualize.yAxisinstead ofvisualize.yAxesfeedbackSummary.tsx
New feedback summary component with AI integrationstatic/app/components/feedback/feedbackSummary.tsx
exist
aggregateFields.tsx
Update aggregate fields for single-axis visualizationsstatic/app/views/explore/contexts/pageParamsContext/aggregateFields.tsx
isBaseVisualizefunction for external useisVisualizecheck to look foryAxisstring instead ofyAxesarray
getAggregateFieldsFromLocationto create single-axisvisualizations
updateLocationWithAggregateFieldsto flatten visualize arraysand handle new structure
feedbackListPage.tsx
Integrate feedback summary into feedback list pagestatic/app/views/feedback/feedbackListPage.tsx
FeedbackSummarycomponent importSummaryListContainerto include summaryabove list
SummaryListContainerstyled component with flex column layoutuseFeedbackSummary.tsx
New hook for fetching feedback summarystatic/app/components/feedback/list/useFeedbackSummary.tsx
data flag
user-feedback-ai-summariesutils.tsx
Update explore utils for single-axis visualizationsstatic/app/views/explore/utils.tsx
dedupeArrayimportviewSamplesTargetto iterate singleyAxisinstead of arraycomputeVisualizeSampleTotalsto use singleyAxisaggregateColumnEditorModal.tsx
Update column editor for single-axis visualizationsstatic/app/views/explore/tables/aggregateColumnEditorModal.tsx
handleApplyto calltoJSON()on visualize objectsinsertColumncall to use singleyAxisstringVisualizeSelectorto accessvisualize.yAxisinstead of arrayonChangecalls to use singleyAxisparameterreplayAnalyticsEvents.tsx
Add timeline zoom analytics eventsstatic/app/utils/analytics/replayAnalyticsEvents.tsx
replay.timeline.zoom-inandreplay.timeline.zoom-outevent typesindex.tsx
Update page params context for single-axis visualizationsstatic/app/views/explore/contexts/pageParamsContext/index.tsx
isBaseVisualizeimportdefaultSortByscall to use singleyAxisinstead of arrayfindAllFieldRefsto use singleyAxisandisBaseVisualizefilter
toolbarSaveAs.tsx
Update toolbar save as for single-axis visualizationsstatic/app/views/explore/toolbar/toolbarSaveAs.tsx
dedupeArrayimportvisualizeYAxesto map singleyAxisinstead of flattening arrayyAxis5 files
parameterization.py
Parameterization regex experiment removal and simplificationsrc/sentry/grouping/parameterization.py
ParameterizationRegexExperimentclass that was unusedParameterizationExperimenttype alias to only includeParameterizationCallableExperimentexperiments
0920_convert_org_saved_searches_to_views_revised.py
Migration 0920 disabled with reference to corrected versionsrc/sentry/migrations/0920_convert_org_saved_searches_to_views_revised.py
0917_convert_org_saved_searches_to_views.py
Migration 0917 disabled with reference to corrected versionsrc/sentry/migrations/0917_convert_org_saved_searches_to_views.py
delete.py
Replay deletion null segment ID handlingsrc/sentry/replays/usecases/delete.py
max_segment_idin_make_recording_filenamesfunction
MatchedRowTypedDict to allowmax_segment_idto beNoneerrors
index.tsx
Simplify project retrieval in replay AI viewstatic/app/views/replays/detail/ai/index.tsx
decodeScalaranduseLocationQueryimportsreplayRecord?.project_iddirectly6 files
deliver_webhooks.py
Webhook delivery task processing deadline configurationsrc/sentry/hybridcloud/tasks/deliver_webhooks.py
processing_deadline_duration=30toschedule_webhook_deliverytask configuration
processing_deadline_duration=300todrain_mailboxtaskconfiguration
processing_deadline_duration=120todrain_mailbox_paralleltaskconfiguration
defaults.py
Autofix automation tuning default value changesrc/sentry/projectoptions/defaults.py
sentry:autofix_automation_tuningfrom"low"to
"off"constants.py
Constants autofix automation tuning default updatesrc/sentry/constants.py
DEFAULT_AUTOFIX_AUTOMATION_TUNING_DEFAULTconstant from"low"to
"off"check_auth.py
Auth check identities task processing deadline configurationsrc/sentry/tasks/auth/check_auth.py
processing_deadline_duration=60tocheck_auth_identitiestaskconfiguration
grouptype.py
DB query injection vulnerability noise configurationsrc/sentry/issues/grouptype.py
noise_config = NoiseConfig(ignore_limit=5)toDBQueryInjectionVulnerabilityGroupTypeconfig.yml
Add metrics service and subscription result consumersdevservices/config.yml
snuba-metricsservice configuration for fast aggregation andquery capabilities
(eap-spans, eap-items, metrics, generic-metrics)
tracingprofile with all required services fortrace processing
14 files
newTraceDetailsHeader.tsx
Replace custom flex components with Flex componentstatic/app/components/events/interfaces/spans/newTraceDetailsHeader.tsx
FlexBoxandBreakDownRowstyled components withFlexcomponent
Flexwithalign="center"andjustify="space-between"propsintegratedOrgSelector.tsx
Replace custom flex containers with Flex componentstatic/app/components/codecov/integratedOrgSelector/integratedOrgSelector.tsx
FlexContainerstyled components withFlexcomponentFlexwithjustifyandgappropsrow.tsx
Replace custom flex center components with Flexstatic/app/views/alerts/list/rules/row.tsx
FlexCenterstyled components withFlexcomponentFlex align="center"for all alignment needscodeOwnerFileTable.tsx
Replace custom flex components with Flexstatic/app/views/settings/project/projectOwnership/codeOwnerFileTable.tsx
FlexCenterstyled components withFlexcomponentFlex align="center" gap={space(1)}for consistentspacing
addUploadToken.tsx
Replace custom flex containers with Flex componentstatic/app/views/codecov/tests/onboardingSteps/addUploadToken.tsx
styledimport from emotionFlexContainerstyled components withFlexcomponentFlex justify="space-between" gap={space(1)}traceTabsAndVitals.tsx
Replace custom flex components with Flexstatic/app/views/performance/newTraceDetails/traceTabsAndVitals.tsx
Flexcomponent importFlexBoxandContainerstyled components withFlexFlexwith appropriate propsteamMisery.tsx
Replace custom flex components with Flexstatic/app/views/organizationStats/teamInsights/teamMisery.tsx
Flexcomponent importFlexCenterstyled components withFlex align="center"FlexcomponentorganizationSampleRateInput.tsx
Replace custom flex components with Flexstatic/app/views/settings/dynamicSampling/organizationSampleRateInput.tsx
Flexcomponent importFlexRowandWrapperstyled components withFlexFlex gap={space(1)}for consistent spacingWrappertoSampleRateRowfor clarityalertRuleStatus.tsx
Replace custom flex component with Flexstatic/app/views/alerts/list/rules/alertRuleStatus.tsx
Flexcomponent importFlexCenterstyled component withFlex align="center"branchSelector.tsx
Replace custom flex container with Flexstatic/app/components/codecov/branchSelector/branchSelector.tsx
Flexcomponent importFlexContainerwithFlex align="center"gap={space(0.75)}useGetTraceItemAttributeValues.tsx
Refactor trace item attribute values hookstatic/app/views/explore/hooks/useGetTraceItemAttributeValues.tsx
useTraceItemAttributeValuestouseGetTraceItemAttributeValuesUseTraceItemAttributeValuesPropstoUseGetTraceItemAttributeValuesPropsattributeKey,enabled, andsearchparametersexplore/typescodeSnippet.tsx
Replace custom flex spacer with Flex.Itemstatic/app/components/codeSnippet.tsx
Flexcomponent importFlexSpacerstyled component withFlex.Item grow={1}repoSelector.tsx
Replace custom flex container with Flexstatic/app/components/codecov/repoPicker/repoSelector.tsx
Flexcomponent importFlexContainerwithFlex align="center"gap={space(0.75)}eventAttachments.tsx
Replace custom flex component with Flexstatic/app/components/events/eventAttachments.tsx
Flexcomponent importFlexCenterwithFlex align="center"35 files