Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 1354478
Author: Raj Joshi <raj.joshi@sentry.io>
Date:   Wed May 8 09:56:24 2024 -0700

    feat(chartcuterie): Change Chart Stylings (#70489)

    two quick updates:

    1. Changes the label for regressed to a darker color so we can read it
    better

    ![image](https://github.com/getsentry/sentry/assets/33237075/80cd09dd-3619-4d58-abd3-65795de248c0)

    2. Updated some chart styling for slack so the legend is on the left

    ![image](https://github.com/getsentry/sentry/assets/33237075/de5a048a-cad5-4e9a-b152-15cbf9bc254e)

commit 56514bc
Author: Catherine Lee <55311782+c298lee@users.noreply.github.com>
Date:   Wed May 8 12:47:19 2024 -0400

    ref(replay): Rage click clicked element name (#70493)

    Since we now use react component names in the selector path, we should
    modify clicked element to provide more specific info such as class, role
    etc.
    This prevents giving the react component name twice and would give more
    info for debugging since react component names aren't very specific

    Before:
    <img width="845" alt="image"
    src="https://github.com/getsentry/sentry/assets/55311782/87b6c8cd-1b29-40bb-b448-715595cb255b">

commit 35b38d9
Author: Steven Eubank <47563310+smeubank@users.noreply.github.com>
Date:   Wed May 8 18:38:57 2024 +0200

    Add Deno Runtime Icon (#69100)

    QoL, this has been bugging me

    Should show the Deno icon, from Deno runtimes hosted on Supabase and
    others

    after:

    ![image](https://github.com/getsentry/sentry/assets/47563310/a1c63d17-3a89-4639-93d1-bca250f0bc31)

    ![image](https://github.com/getsentry/sentry/assets/47563310/ca66d7cd-8315-4366-a828-8a93936c1a07)

commit a96f1ff
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Wed May 8 12:34:37 2024 -0400

    ref(crons): Improve details legend (#70515)

    The legend now differentiates between timeout and failed

    <img alt="clipboard.png" width="267"
    src="https://i.imgur.com/yQAfXaB.png" />

    ---------

    Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>

commit c3b9fdb
Author: Matt Duncan <14761+mrduncan@users.noreply.github.com>
Date:   Wed May 8 09:23:28 2024 -0700

    chore(issues): Enable stronger typing on two endpoints (#70488)

    This is another quick follow up to #69828 since these two type errors
    are trivial to resolve.

commit dbc926a
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Wed May 8 12:22:14 2024 -0400

    ref(crons): Move timezone to schedule text (#70511)

    <img width="295" alt="image"
    src="https://github.com/getsentry/sentry/assets/1421724/fd919e5b-0dd6-4b41-8e84-d3b99dfe6042">

    It is now next to the schedule. This is more logical

commit 9a90b57
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Wed May 8 12:18:49 2024 -0400

    ref(crons): Use constant for DEFAULT_CHECKIN_MARGIN (#70510)

commit f161ebb
Author: Colleen O'Rourke <colleen@sentry.io>
Date:   Wed May 8 09:16:58 2024 -0700

    ref(daily summary): Disable notification (#70295)

    I don't currently have any time to dedicate to bug fixing and it's been
    sending multiple times, so this is going to be disabled for now. We'll
    likely have to keep track of which users per org received the
    notification and check that before sending, and then clear it out every
    hour to avoid duplicate sending.

commit 7d1cf85
Author: Matt Duncan <14761+mrduncan@users.noreply.github.com>
Date:   Wed May 8 08:58:45 2024 -0700

    chore(issues): Enable stronger typing on occurrence_consumer (#70487)

    This is a quick follow up to #69828 since these two type errors are
    trivial to resolve.

commit 6b530ff
Author: colin-sentry <161344340+colin-sentry@users.noreply.github.com>
Date:   Wed May 8 11:50:48 2024 -0400

    chore(ai-monitoring): Add a unit to total cost (#70484)

commit 50b4ed3
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Wed May 8 11:32:28 2024 -0400

    ref(routes): A few more routes using withOrgPath (#70449)

commit 4d124bd
Author: Evan Hicks <evanh@users.noreply.github.com>
Date:   Wed May 8 11:19:07 2024 -0400

    fix: Add a metric for non-success Snuba requests (#70452)

    Tracking this on the Sentry side allows alerts to be created that are
    separate
    from the Snuba API itself, in case the API is in a broken state and
    can't
    accurately report what is happening.

commit 11a80a3
Author: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
Date:   Wed May 8 10:36:32 2024 -0400

    feat(cache): add average transaction duration to sample sidebar (#70445)

    New metric readout for avg transaction duration in sample sidebar
    <img width="746" alt="image"
    src="https://github.com/getsentry/sentry/assets/44422760/35146610-5c41-4e12-917e-e58310da84a9">

commit eb4de59
Author: Ash <0Calories@users.noreply.github.com>
Date:   Wed May 8 10:25:30 2024 -0400

    feat(perf): Add backend referrers for span summary and span metrics (#70466)

    Adds backend referrers to be used on the new span summary and span
    metrics pages

    Relevant PR: #69159

commit d3d6bdf
Author: Mark Story <mark@mark-story.com>
Date:   Wed May 8 10:20:37 2024 -0400

    chore(actor) Remove Actor model from django state (#70439)

    Remove the Actor model from django state.

    Refs HC-1183

commit 5bff933
Author: anthony sottile <103459774+asottile-sentry@users.noreply.github.com>
Date:   Wed May 8 08:34:04 2024 -0400

    ref: remove unused partition parameter from buffer (#70441)

    <!-- Describe your PR here. -->

commit 7512ed6
Author: Yagiz Nizipli <yagiz@nizipli.com>
Date:   Wed May 8 07:29:26 2024 -0400

    perf: use orjson in all middlewares (#70456)

commit 4623b5d
Author: Tony Xiao <txiao@sentry.io>
Date:   Wed May 8 06:07:45 2024 -0400

    fix(trace-explorer): Date range narrowing condition is backwards (#70496)

    This was changing the end timestamp to be too narrow and missing some
    spans.

commit fc8b666
Author: Ryan Hiebert <ryan@ryanhiebert.com>
Date:   Wed May 8 02:33:09 2024 -0500

    Use last forwarded IP (#68884)

    Well-behaved forwarders will append the IP they're forwarding for to an
    existing list. In the most typical case, this means that only the last
    one is trustworthy from a spoofing request-maker.

    And all this is assuming that the proxy itself is trusted.

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#security_and_privacy_concerns

    <!-- Describe your PR here. -->

    <!--

      Sentry employees and contractors can delete or ignore the following.

    -->

    ### Legal Boilerplate

    Look, I get it. The entity doing business as "Sentry" was incorporated
    in the State of Delaware in 2015 as Functional Software, Inc. and is
    gonna need some rights from me in order to utilize my contributions in
    this here PR. So here's the deal: I retain all rights, title and
    interest in and to my contributions, and by keeping this boilerplate
    intact I confirm that Sentry can use, modify, copy, and redistribute my
    contributions, under Sentry's choice of terms.

commit 01160aa
Author: Katie Byers <katie.byers@sentry.io>
Date:   Tue May 7 16:41:32 2024 -0700

    ref(seer-grouping): Switch to using `hash` and `parent_hash` from `group_hash` and `parent_group_hash` (#70383)

    As we've been thinking about the switch from sending and receiving group ids when communicating with Seer to doing so with hashes, all along we've been talking about those hashes as "group hashes." In truth, though, hash values are based on the data in a particular event (not the group overall), and indeed, that's how we're using them in Seer - pairing up hashes not with what group they're in but which event data they represent. There _is_ a pairing of groups and hashes - on the Sentry side, in the form of the `GroupHash` table - but entries from that table aren't what we're using with Seer. With Seer, we only care about the "hash" part of `GroupHash`.

    So, both for accuracy and so as to be able to differentiate in Seer-related Sentry code between hashes (hex strings) and grouphashes (association table records), we're switching from using `group_hash` and `parent_group_hash` to using `hash` and `parent_hash`.

    This PR makes the change on the Sentry side. Fortunately, nothing in Seer is yet relying on hashes, so as long as we wait for this to go live, we can then add hash support on the seer side using the new names from the get-go.

commit 173b690
Author: Raj Joshi <raj.joshi@sentry.io>
Date:   Tue May 7 16:32:23 2024 -0700

    fix(chartcuterie): Added Visual Map Field for Endpoint Regression (#70477)

    There is mismatch in the way we build the EChart Options object in our
    FE code and how Chartcuterie handles it.

    In our FE
    [code,](https://github.com/getsentry/sentry/blob/master/static/app/components/events/eventStatisticalDetector/breakpointChartOptions.tsx#L89-L104),
    we wrap the visualMap object in an extra option, which allows us to
    maintain the hierarchy for styling. However, Chartcuterie cannot handle
    the wrapped object, so when we pass the service the options, we unwrap
    it.

    I also created a modifier option to modify chart options specifically
    for slack and removed the icon from the legend icon from there.

    ![example2](https://github.com/getsentry/sentry/assets/33237075/2ecdf0db-3abd-4245-a426-b371c6a2fd98)

commit e624ee9
Author: Matt Duncan <14761+mrduncan@users.noreply.github.com>
Date:   Tue May 7 16:17:45 2024 -0700

    chore(issues): Opt in already passing issues files to stronger typing (#69828)

    `sentry.issues.*` and `test.sentry.issues.*` are not close to passing
    but in the mean time we can get incremental benefits and prevent
    regressions by opting in modules which are already passing.

    #69374 includes a bit more details and outlines additional fixes we can
    follow up this change with.

commit dbf524c
Author: Seiji Chew <67301797+schew2381@users.noreply.github.com>
Date:   Tue May 7 15:58:22 2024 -0700

    fix(ui): Revert to using project release commmit API (#70485)

    In #63860 we switched from a
    class component to a FC and also switched from hitting
    `ProjectReleaseCommitsEndpoint` to `OrganizationReleaseCommitsEndpoint`.

    The latter doesn't respect repo name or id in the query param, which
    makes it so selecting a repo in the dropdown will show you commits from
    other repos (and also messes up pagination as well, not showing you all
    commits).

    Related to #70411

commit 0b96de4
Author: Dan Fuller <dfuller@sentry.io>
Date:   Tue May 7 15:53:42 2024 -0700

    chore(crons): Rename badly named api file (#70480)

    I accidentally pluralised this when creating it, just fixing.

commit 2489a4a
Author: Dominik Buszowiecki <44422760+DominikB2014@users.noreply.github.com>
Date:   Tue May 7 18:19:21 2024 -0400

    fix(cache): update docs link (#70475)

    The link to the docs will be plural

commit 7ea571e
Author: Katie Byers <katie.byers@sentry.io>
Date:   Tue May 7 15:17:08 2024 -0700

    chore(events): Move `PLACEHOLDER_EVENT_TITLES` to a neutral location (#70470)

    I tried to use `PLACEHOLDER_EVENT_TITLES` in an upcoming PR, and landed in a circular dependency with `event_manager.py`, where it currently lives. This moves it to `constants.py`, which solves the problem.

commit a97dccf
Author: Michael Sun <55160142+MichaelSun48@users.noreply.github.com>
Date:   Tue May 7 18:11:47 2024 -0400

    chore(issue-stream): Register feature flag for upcoming changes to issues stream events graph (#70471)

    [Project details](#69691)

    * [SOA PR
    ](getsentry/sentry-options-automator#1378)
    * ~~getSentry PR~~ (No longer necessary)

commit fadd0b5
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Tue May 7 18:00:45 2024 -0400

    fix(ui): Use new illustration for tracing keyboard shortcuts (#70474)

    <img alt="clipboard.png" width="665"
    src="https://i.imgur.com/h8p3E1H.png" />

    Looks like the rest of the product now

commit 277f026
Author: Scott Cooper <scttcper@gmail.com>
Date:   Tue May 7 14:54:57 2024 -0700

    feat(metrics): Add metricSecond to allowed category (#70442)

commit ef6c79a
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Tue May 7 17:50:52 2024 -0400

    Revert "ref(crons): Normalize crons incident issues (#70289)" (#70469)

    This reverts commit 9d56889.

commit 45d2d2e
Author: Cathy Teng <70817427+cathteng@users.noreply.github.com>
Date:   Tue May 7 14:46:55 2024 -0700

    feat(slack): EA :white_circle: for actions by adding to issue alert threads FF (#70468)

commit 80ed536
Author: Tony Xiao <txiao@sentry.io>
Date:   Tue May 7 17:25:18 2024 -0400

    fix(trace-explorer): Breakdown by project and sdk (#70463)

    For full stack projects that use a single project for all the data, we
    need to break it down further using sdk.

commit 874db7e
Author: Katie Byers <katie.byers@sentry.io>
Date:   Tue May 7 14:24:19 2024 -0700

    ref(seer-grouping): Send group hash to Seer (#70244)

    This adds the group hash to the outgoing payload sent to Seer. Once this is merged, it will be safe to remove the Seer logic handling an incoming group id, since we'll now be able to rely on the group hash being present.

    Taken together, this PR and the ones leading up to it (links below) mean will mean that on the Sentry side we'll be sending in the request and handling in the response both hash and group id (and transforming hashes in the response into group ids if hashes are all that's sent). Once Seer is adjusted to only deal in hashes, we can then remove the sending and handling of group ids from Sentry and the transition will be complete.

    Other PRs which are part of the group-id-to-group-hash switch:
    - #70005, #70236, and #70237 - various small fixes and tweaks
    - #70070 and #70238 - updates to associated types
    - #70240 - automatic conversion from hash to group id when handling Seer similar group data

commit 78d2f28
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Tue May 7 17:23:38 2024 -0400

    ref(routes): Prioritize customer domains route (#70451)

    In a936fb0 we introduced a new
    withOrgPath prop to the Route component. This caused the route to have
    the same behaviour as doing

    ```tsx
    <Framgnet>
      {USING_CUSTOMER_DOMAIN && (
        <Route
          path="/some-path/"
          component={withDomainRequired(make(() => import('sentry/views/someView')))}
        />
      )}
      <Route
        path="/organizations/:orgId/some-path/"
        component={withDomainRedirect(make(() => import('sentry/views/someView')))}
      />
    </Framgnet>
    ```

    However the introduced logic generated the routes in the opposite order,
    where the org slug version would get priority.

    For some future changes this becomes important so I am bringing back
    this matching behaviour

commit 3a7e9b3
Author: Evan Purkhiser <evanpurkhiser@gmail.com>
Date:   Tue May 7 17:23:31 2024 -0400

    fix(crons): Teams -> Owners (#70464)

commit 2dbccba
Author: anthony sottile <103459774+asottile-sentry@users.noreply.github.com>
Date:   Tue May 7 17:13:26 2024 -0400

    ref: upgrade djangorestframework-stubs (#70461)

    upgrading this has no differences in ignored mypy errors

    <!-- Describe your PR here. -->

commit 0c8f916
Author: Mark Story <mark@mark-story.com>
Date:   Tue May 7 16:49:43 2024 -0400

    chore(database) Drop tables for project and team avatar (#68616)

    These tables no longer have django models, and can be deleted.

commit 4f71b8e
Author: Leander Rodrigues <leander.rodrigues@sentry.io>
Date:   Tue May 7 16:39:00 2024 -0400

    feat(highlights): Variety of fixes/changes to highlights work (#70355)

    This PR makes a variety of changes to the highlights/tags areas:
    - [x] Add tests for analytics and user friendly names

    - [x] Add search to the highlights modal

    ![image](https://github.com/getsentry/sentry/assets/35509934/75beb7c9-90c3-40a3-84d9-f4b585297de5)

    - [x] Allow `replayId`, `transaction` and tags with URLs to be clickable

    ![image](https://github.com/getsentry/sentry/assets/35509934/bc0f4ac6-a2c2-496a-bcfa-6e14c811d151)

    - [x] Adds a feedback button on Highlight section

    ![image](https://github.com/getsentry/sentry/assets/35509934/064edd41-1a83-48a9-ad12-b0de8102db4c)

    **todo**
    - [x] Add tests for search
    - [x] Add tests for new tag links
    - [x] Add screenshots of changes

commit aa40406
Author: Snigdha Sharma <snigdha.sharma@sentry.io>
Date:   Tue May 7 13:36:54 2024 -0700

    fix(escalating-issues): Cleanup query for escalating forecasts (#70443)

    Cleans up some cruft left behind by feature flags and pushes the
    escalation check out of the query to help with timeouts.

    Fixes SENTRY-18AS

commit 81d3fef
Author: Seiji Chew <67301797+schew2381@users.noreply.github.com>
Date:   Tue May 7 13:32:10 2024 -0700

    nit: Remove authenticators from state (#70365)

    Remove `authenticators` from state because we only set it once
  • Loading branch information
iamrajjoshi committed May 8, 2024
1 parent 39a8837 commit 11858dc
Show file tree
Hide file tree
Showing 114 changed files with 1,526 additions and 1,045 deletions.
15 changes: 1 addition & 14 deletions fixtures/backup/model_dependencies/detailed.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,6 @@
"kind": "FlexibleForeignKey",
"model": "sentry.team",
"nullable": true
},
"user_id": {
"kind": "HybridCloudForeignKey",
"model": "sentry.user",
"nullable": true
}
},
"model": "sentry.actor",
Expand All @@ -344,14 +339,7 @@
"Region"
],
"table_name": "sentry_actor",
"uniques": [
[
"team"
],
[
"user_id"
]
]
"uniques": []
},
"sentry.alertrule": {
"dangling": false,
Expand Down Expand Up @@ -5803,7 +5791,6 @@
},
"model": "sentry.snubaquery",
"relocation_dependencies": [
"sentry.actor",
"sentry.organization",
"sentry.project"
],
Expand Down
3 changes: 1 addition & 2 deletions fixtures/backup/model_dependencies/flat.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
"sentry.user"
],
"sentry.actor": [
"sentry.team",
"sentry.user"
"sentry.team"
],
"sentry.alertrule": [
"sentry.organization",
Expand Down
2 changes: 1 addition & 1 deletion migrations_lockfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ feedback: 0004_index_together
hybridcloud: 0016_add_control_cacheversion
nodestore: 0002_nodestore_no_dictfield
replays: 0004_index_together
sentry: 0713_team_remove_actor_state
sentry: 0715_remove_actormodel_constraints
social_auth: 0002_default_auto_field
42 changes: 42 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,35 @@ module = [
"sentry.buffer.base",
"sentry.buffer.redis",
"sentry.eventstore.reprocessing.redis",
"sentry.issues",
"sentry.issues.analytics",
"sentry.issues.apps",
"sentry.issues.constants",
"sentry.issues.endpoints",
"sentry.issues.endpoints.group_events",
"sentry.issues.endpoints.organization_activity",
"sentry.issues.endpoints.organization_release_previous_commits",
"sentry.issues.endpoints.project_stacktrace_link",
"sentry.issues.escalating_group_forecast",
"sentry.issues.escalating_issues_alg",
"sentry.issues.forecasts",
"sentry.issues.ignored",
"sentry.issues.ingest",
"sentry.issues.issue_occurrence",
"sentry.issues.json_schemas",
"sentry.issues.merge",
"sentry.issues.occurrence_consumer",
"sentry.issues.ongoing",
"sentry.issues.priority",
"sentry.issues.producer",
"sentry.issues.query",
"sentry.issues.receivers",
"sentry.issues.related.*",
"sentry.issues.run",
"sentry.issues.status_change",
"sentry.issues.status_change_consumer",
"sentry.issues.status_change_message",
"sentry.issues.update_inbox",
"sentry.lang.java.processing",
"sentry.llm.*",
"sentry.migrations.*",
Expand Down Expand Up @@ -607,6 +635,20 @@ module = [
"sentry_plugins.base",
"tests.sentry.api.endpoints.issues.*",
"tests.sentry.grouping.test_fingerprinting",
"tests.sentry.issues",
"tests.sentry.issues.endpoints",
"tests.sentry.issues.test_escalating_issues_alg",
"tests.sentry.issues.test_group_attributes_dataset",
"tests.sentry.issues.test_grouptype",
"tests.sentry.issues.test_ignored",
"tests.sentry.issues.test_ingest",
"tests.sentry.issues.test_issue_occurrence",
"tests.sentry.issues.test_json_schemas",
"tests.sentry.issues.test_merge",
"tests.sentry.issues.test_ongoing",
"tests.sentry.issues.test_search_issues_dataset",
"tests.sentry.issues.test_status_change",
"tests.sentry.issues.test_update_inbox",
"tests.sentry.relay.config.test_metric_extraction",
"tests.sentry.tasks.test_on_demand_metrics",
"tools.*",
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev-frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ sentry-arroyo==2.16.5
sentry-cli==2.16.0
sentry-devenv==1.6.2
sentry-forked-django-stubs==5.0.0.post3
sentry-forked-djangorestframework-stubs==3.14.5.post1
sentry-forked-djangorestframework-stubs==3.15.0.post1
sentry-kafka-schemas==0.1.79
sentry-ophio==0.2.7
sentry-redis-tools==0.1.7
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packaging>=21.3

# for type checking
sentry-forked-django-stubs>=5.0.0.post3
sentry-forked-djangorestframework-stubs>=3.14.5.post1
sentry-forked-djangorestframework-stubs>=3.15.0.post1
lxml-stubs
msgpack-types>=0.2.0
mypy>=1.10
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/api/endpoints/group_similar_issues_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def get(self, request: Request, group) -> Response:

similar_issues_params: SimilarIssuesEmbeddingsRequest = {
"group_id": group.id,
"hash": latest_event.get_primary_hash(),
"project_id": group.project.id,
"stacktrace": stacktrace_string,
"message": group.message,
Expand All @@ -183,6 +184,7 @@ def get(self, request: Request, group) -> Response:
organization_id=group.organization.id,
project_id=group.project.id,
group_id=group.id,
hash=latest_event.get_primary_hash(),
count_over_threshold=len(
[
result.stacktrace_distance
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/api/endpoints/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
Referrer.API_PERFORMANCE_MOBILE_UI_SCREEN_TABLE.value,
Referrer.API_PERFORMANCE_MOBILE_UI_SPAN_TABLE.value,
Referrer.API_PERFORMANCE_MOBILE_UI_METRICS_RIBBON.value,
Referrer.API_PERFORMANCE_SPAN_SUMMARY_HEADER_DATA.value,
Referrer.API_PERFORMANCE_SPAN_SUMMARY_TABLE.value,
}

API_TOKEN_REFERRER = Referrer.API_AUTH_TOKEN_EVENTS.value
Expand Down
3 changes: 3 additions & 0 deletions src/sentry/api/endpoints/organization_events_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
Referrer.API_PERFORMANCE_HTTP_DOMAIN_SUMMARY_THROUGHPUT_CHART.value,
Referrer.API_PERFORMANCE_HTTP_SAMPLES_PANEL_DURATION_CHART.value,
Referrer.API_PERFORMANCE_HTTP_SAMPLES_PANEL_RESPONSE_CODE_CHART.value,
Referrer.API_PERFORMANCE_SPAN_SUMMARY_DURATION_CHART.value,
Referrer.API_PERFORMANCE_SPAN_SUMMARY_THROUGHPUT_CHART.value,
Referrer.API_PERFORMANCE_SPAN_SUMMARY_TRANSACTION_THROUGHPUT_CHART.value,
}


Expand Down
5 changes: 4 additions & 1 deletion src/sentry/api/endpoints/organization_stats_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ def get(self, request: Request, organization) -> Response:
with self.handle_query_errors():

if features.has("organizations:metrics-stats", organization):
if request.GET.get("category") == "metrics":
if (
request.GET.get("category") == "metrics"
or request.GET.get("category") == "metricSecond"
):
# TODO(metrics): align project resolution
result = run_metrics_outcomes_query(
request.GET,
Expand Down
16 changes: 15 additions & 1 deletion src/sentry/api/endpoints/organization_traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

class TraceInterval(TypedDict):
project: str | None
sdkName: str | None
start: int
end: int
kind: Literal["project", "missing", "other"]
Expand Down Expand Up @@ -356,12 +357,17 @@ def get_traces_matching_metric_conditions(
return min_timestamp, max_timestamp, [], []
else:
# No user queries so take the first N trace ids as our list
min_timestamp = snuba_params.end
max_timestamp = snuba_params.start
assert min_timestamp is not None
assert max_timestamp is not None

trace_ids = trace_ids[: self.limit]
timestamps = timestamps[: self.limit]
for timestamp in timestamps:
if timestamp < min_timestamp:
min_timestamp = timestamp
if timestamp < max_timestamp:
if timestamp > max_timestamp:
max_timestamp = timestamp

self.refine_params(min_timestamp, max_timestamp)
Expand Down Expand Up @@ -637,6 +643,8 @@ def process_final_results(
# mapping of trace id to a tuple of project slug + transaction name
traces_names: MutableMapping[str, tuple[str, str]] = {}
for row in traces_breakdown_projects_results["data"]:
if row["trace"] in traces_names:
continue
# The underlying column is a Nullable(UInt64) but we write a default of 0 to it.
# So make sure to handle both in case something changes.
if not row["parent_span"] or int(row["parent_span"], 16) == 0:
Expand Down Expand Up @@ -706,6 +714,7 @@ def get_traces_breakdown_projects_query(
selected_columns=[
"trace",
"project",
"sdk.name",
"parent_span",
"transaction",
"precise.start_ts",
Expand Down Expand Up @@ -748,6 +757,7 @@ def get_traces_breakdown_categories_query(
"project",
"transaction",
"span.category",
"sdk.name",
"precise.start_ts",
"precise.finish_ts",
],
Expand Down Expand Up @@ -986,6 +996,7 @@ def should_merge(interval_a, interval_b):
return (
interval_a["end"] >= interval_b["start"]
and interval_a["project"] == interval_b["project"]
and interval_a["sdkName"] == interval_b["sdkName"]
and interval_a["opCategory"] == interval_b["opCategory"]
)

Expand Down Expand Up @@ -1014,6 +1025,7 @@ def breakdown_push(trace, interval):
{
"kind": "missing",
"project": None,
"sdkName": None,
"opCategory": None,
"start": last_interval["end"],
"end": interval["start"],
Expand Down Expand Up @@ -1069,6 +1081,7 @@ def stack_clear(trace, until=None):
cur: TraceInterval = {
"kind": "project",
"project": row["project"],
"sdkName": row["sdk.name"],
"opCategory": row.get("span.category"),
"start": span_start,
"end": span_end,
Expand All @@ -1092,6 +1105,7 @@ def stack_clear(trace, until=None):
other: TraceInterval = {
"kind": "other",
"project": None,
"sdkName": None,
"opCategory": None,
"start": trace_range["start"],
"end": trace_range["end"],
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@
from sentry.monitors.endpoints.project_monitor_checkin_index import (
ProjectMonitorCheckInIndexEndpoint,
)
from sentry.monitors.endpoints.project_monitor_details import ProjectMonitorDetailsEndpoint
from sentry.monitors.endpoints.project_monitor_environment_details import (
ProjectMonitorEnvironmentDetailsEndpoint,
)
from sentry.monitors.endpoints.project_monitor_stats import ProjectMonitorStatsEndpoint
from sentry.monitors.endpoints.project_monitors_details import ProjectMonitorDetailsEndpoint
from sentry.replays.endpoints.organization_replay_count import OrganizationReplayCountEndpoint
from sentry.replays.endpoints.organization_replay_details import OrganizationReplayDetailsEndpoint
from sentry.replays.endpoints.organization_replay_events_meta import (
Expand Down
4 changes: 1 addition & 3 deletions src/sentry/backup/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,7 @@ def dependencies() -> dict[NormalizedModelName, ModelRelations]:

# TODO(getsentry/team-ospo#190): In practice, we can treat `AlertRule`'s dependency on
# `Organization` as non-nullable, so mark it is non-dangling. This is a hack - we should figure
# out a more rigorous way to deduce this. The same applies to `Actor`, since each actor must
# reference at least one `User` or `Team`, neither of which are dangling.
model_dependencies_dict[NormalizedModelName("sentry.actor")].dangling = False
# out a more rigorous way to deduce this.
model_dependencies_dict[NormalizedModelName("sentry.alertrule")].dangling = False

# TODO(getsentry/team-ospo#190): The same is basically true for the remaining models in this
Expand Down
6 changes: 2 additions & 4 deletions src/sentry/buffer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ def incr(
}
)

# TODO: `partition` is unused, remove after a deploy

def process_pending(self, partition: int | None = None) -> None:
def process_pending(self) -> None:
return

def process_batch(self, partition: int | None = None) -> None:
def process_batch(self) -> None:
return

def process(
Expand Down
6 changes: 2 additions & 4 deletions src/sentry/buffer/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_hash(

return decoded_hash

def process_batch(self, partition: int | None = None) -> None:
def process_batch(self) -> None:
client = get_cluster_routing_client(self.cluster, self.is_redis_cluster)
lock_key = self._lock_key(client, self.pending_key, ex=10)
if not lock_key:
Expand Down Expand Up @@ -371,9 +371,7 @@ def incr(
tags={"module": model.__module__, "model": model.__name__},
)

# TODO: `partition` is unused, remove after a deploy

def process_pending(self, partition: int | None = None) -> None:
def process_pending(self) -> None:
client = get_cluster_routing_client(self.cluster, self.is_redis_cluster)
lock_key = self._lock_key(client, self.pending_key, ex=60)
if not lock_key:
Expand Down
14 changes: 8 additions & 6 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,12 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
"schedule": crontab(minute="0", hour="12", day_of_week="saturday"),
"options": {"expires": 60 * 60 * 3},
},
"schedule-daily-organization-reports": {
"task": "sentry.tasks.summaries.daily_summary.schedule_organizations",
# Run every 1 hour on business days
"schedule": crontab(minute=0, hour="*/1", day_of_week="mon-fri"),
"options": {"expires": 60 * 60 * 3},
},
# "schedule-daily-organization-reports": {
# "task": "sentry.tasks.summaries.daily_summary.schedule_organizations",
# # Run every 1 hour on business days
# "schedule": crontab(minute=0, hour="*/1", day_of_week="mon-fri"),
# "options": {"expires": 60 * 60 * 3},
# },
"schedule-hybrid-cloud-foreign-key-jobs": {
"task": "sentry.tasks.deletion.hybrid_cloud.schedule_hybrid_cloud_foreign_key_jobs",
# Run every 15 minutes
Expand Down Expand Up @@ -1637,6 +1637,8 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
"organizations:issue-search-group-attributes-side-query": False,
# Enable the updated empty state for issues
"organizations:issue-stream-empty-state": False,
# Enable new events graph design for issue stream
"organizations:issue-stream-new-events-graph": False,
# Enable issue stream performance improvements
"organizations:issue-stream-performance": False,
# Enabled latest adopted release filter for issue alerts
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def get_all_languages() -> list[str]:
DEFAULT_LOGGER_NAME = ""
LOG_LEVELS_MAP = {v: k for k, v in LOG_LEVELS.items()}

PLACEHOLDER_EVENT_TITLES = frozenset(["<untitled>", "<unknown>", "<unlabeled event>", "Error"])

# Default alerting threshold values
DEFAULT_ALERT_PROJECT_THRESHOLD = (500, 25) # 500%, 25 events
DEFAULT_ALERT_GROUP_THRESHOLD = (1000, 25) # 1000%, 25 events
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/db/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class SiloRouter:
"""

historical_silo_assignments = {
"sentry_teamavatar": SiloMode.REGION,
"sentry_projectavatar": SiloMode.REGION,
"sentry_pagerdutyservice": SiloMode.REGION,
"sentry_notificationsetting": SiloMode.CONTROL,
}
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
DEFAULT_STORE_NORMALIZER_ARGS,
LOG_LEVELS_MAP,
MAX_TAG_VALUE_LENGTH,
PLACEHOLDER_EVENT_TITLES,
DataCategory,
)
from sentry.culprit import generate_culprit
Expand Down Expand Up @@ -146,7 +147,6 @@
# Timeout for cached group crash report counts
CRASH_REPORT_TIMEOUT = 24 * 3600 # one day

PLACEHOLDER_EVENT_TITLES = frozenset(["<untitled>", "<unknown>", "<unlabeled event>", "Error"])

HIGH_SEVERITY_THRESHOLD = 0.1

Expand Down
1 change: 1 addition & 0 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:issue-search-allow-postgres-only-search", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
manager.add("organizations:issue-search-group-attributes-side-query", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
manager.add("organizations:issue-stream-empty-state", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
manager.add("organizations:issue-stream-new-events-graph", OrganizationFeature, FeatureHandlerStrategy.OPTIONS)
manager.add("organizations:issue-stream-performance", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
manager.add("organizations:large-debug-files", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
manager.add("organizations:latest-adopted-release-filter", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
Expand Down

0 comments on commit 11858dc

Please sign in to comment.