Skip to content

Conversation

@akshayutture-augment
Copy link

armenzg and others added 30 commits June 20, 2025 12:49
…o 'low' (#93927)"

This reverts commit 8d04522.

Co-authored-by: roaga <47861399+roaga@users.noreply.github.com>
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 <cursoragent@cursor.com>
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 <cursoragent@cursor.com>
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 <56095982+michellewzhang@users.noreply.github.com>
…948)

gets `npx @typescript/native-preview` passing again
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
![Screenshot 2025-06-20 at 12 00
54 PM](https://github.com/user-attachments/assets/97ca72da-0a52-4446-9825-cd4fcb505adf)

after
![Screenshot 2025-06-20 at 11 59
29 AM](https://github.com/user-attachments/assets/a4284d2b-c9f5-442f-b010-7fe72a598e39)
### 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 <abdullahkhan@PG9Y57YDXQ.local>
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.
mrduncan and others added 2 commits June 20, 2025 13:20
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.
@akshayutture-augment
Copy link
Author

@greptileai

@greptile-apps
Copy link

greptile-apps bot commented Nov 14, 2025

Greptile Overview

Confidence Score: 2/5

  • This PR contains a critical validation logic bug that could cause runtime issues
  • The browser reporting collector has a flawed validation approach for mutually exclusive fields (age/timestamp) that doesn't properly enforce that exactly one field must be present. While tests exist, the validation logic needs correction to handle all edge cases properly.
  • Pay close attention to src/sentry/issues/endpoints/browser_reporting_collector.py - the validation logic for age/timestamp fields needs to be fixed before merge

Important Files Changed

File Analysis

Filename Score Overview
src/sentry/issues/endpoints/browser_reporting_collector.py 2/5 Refactored to use Django REST framework serializers for validation, but has critical validation logic bug that could allow invalid reports or reject valid ones
src/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py 4/5 Added error event fetching and chronological merging with breadcrumbs, well-structured with proper error handling
src/sentry/replays/usecases/delete.py 5/5 Added null check for max_segment_id to prevent crashes when no segments were ingested
src/sentry/workflow_engine/endpoints/validators/base/detector.py 4/5 Added owner field support for detectors with proper handling of user/team ownership
static/app/views/explore/contexts/pageParamsContext/visualizes.tsx 4/5 Refactored Visualize class from array-based yAxes to single yAxis, maintaining backward compatibility through fromJSON

Sequence Diagram

sequenceDiagram
    participant Browser
    participant API as Browser Reporting Collector
    participant Validator as BrowserReportSerializer
    participant Metrics
    
    Browser->>API: POST /reporting-api (array of reports)
    API->>API: Check feature flag enabled
    alt Feature flag disabled
        API-->>Browser: 404 Not Found
    end
    
    API->>API: Validate request data is array
    alt Not array
        API-->>Browser: 422 Unprocessable Entity
    end
    
    loop For each report
        API->>Validator: Validate report structure
        Validator->>Validator: Check required fields
        Validator->>Validator: Validate age/timestamp fields
        alt Validation fails
            API-->>Browser: 422 with validation errors
        end
        Validator-->>API: Validated report data
    end
    
    loop For each validated report
        API->>Metrics: Record browser_reporting.raw_report_received
    end
    
    API-->>Browser: 200 OK
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

106 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines +50 to +60
def validate_timestamp(self, value: int) -> int:
"""Validate that age is absent, but timestamp is present."""
if self.initial_data.get("age"):
raise serializers.ValidationError("If timestamp is present, age must be absent")
return value

def validate_age(self, value: int) -> int:
"""Validate that age is present, but not timestamp."""
if self.initial_data.get("timestamp"):
raise serializers.ValidationError("If age is present, timestamp must be absent")
return value
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Validation logic prevents valid reports from being accepted. When both age and timestamp are present, both validators reject the report, but according to the test on line 167-175, only one should be present at a time.

However, the validation methods will BOTH be called when both fields are present (because they're not mutually exclusive in the serializer definition), creating a situation where:

  1. If only timestamp is provided: validate_timestamp checks for age in initial_data (line 52) - passes
  2. If only age is provided: validate_age checks for timestamp in initial_data (line 58) - passes
  3. If BOTH are provided: BOTH validators run and BOTH raise ValidationError

The issue: If timestamp is present but age is absent from initial_data, the check on line 52 if self.initial_data.get("age") evaluates to False/None and doesn't raise an error. This means a report with ONLY timestamp (no age) will pass validation correctly.

But there's a deeper issue: the validators should ensure exactly ONE of the fields is present, not that both are absent. The current logic doesn't enforce that at least one field must be present.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/sentry/issues/endpoints/browser_reporting_collector.py
Line: 50:60

Comment:
**logic:** Validation logic prevents valid reports from being accepted. When both `age` and `timestamp` are present, both validators reject the report, but according to the test on line 167-175, only one should be present at a time.

However, the validation methods will BOTH be called when both fields are present (because they're not mutually exclusive in the serializer definition), creating a situation where:
1. If only `timestamp` is provided: `validate_timestamp` checks for `age` in initial_data (line 52) - passes
2. If only `age` is provided: `validate_age` checks for `timestamp` in initial_data (line 58) - passes  
3. If BOTH are provided: BOTH validators run and BOTH raise ValidationError

The issue: If `timestamp` is present but `age` is absent from `initial_data`, the check on line 52 `if self.initial_data.get("age")` evaluates to False/None and doesn't raise an error. This means a report with ONLY `timestamp` (no `age`) will pass validation correctly.

But there's a deeper issue: the validators should ensure exactly ONE of the fields is present, not that both are absent. The current logic doesn't enforce that at least one field must be present.

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.