Skip to content

Commit 742f7b1

Browse files
committed
Merge branch 'master' into tkdodo/ref/decouple-button-tracking
2 parents 5b62c0d + 8a1d3d9 commit 742f7b1

File tree

27 files changed

+642
-245
lines changed

27 files changed

+642
-245
lines changed

src/sentry/autofix/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def is_seer_scanner_rate_limited(
176176
if features.has("organizations:unlimited-auto-triggered-autofix-runs", organization):
177177
return False, 0, 0
178178

179-
limit = options.get("seer.max_num_scanner_autotriggered_per_hour", 1000)
179+
limit = options.get("seer.max_num_scanner_autotriggered_per_hour", 2500)
180180
is_rate_limited, current, _ = ratelimits.backend.is_limited_with_value(
181181
project=project,
182182
key="seer.scanner.auto_triggered",

src/sentry/grouping/parameterization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def compiled_pattern(self) -> re.Pattern[str]:
123123
(\d{4}-?[01]\d-?[0-3]\d\s[0-2]\d:[0-5]\d:[0-5]\d)(\.\d+)?
124124
|
125125
# Kitchen
126-
(\d{1,2}:\d{2}(:\d{2})?(?: [aApP][Mm])?)
126+
([1-9]\d?:\d{2}(:\d{2})?(?: [aApP][Mm])?)
127127
|
128128
# Date
129129
(\d{4}-[01]\d-[0-3]\d)

src/sentry/options/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@
603603
register("seer.max_num_autofix_autotriggered_per_hour", default=20, flags=FLAG_AUTOMATOR_MODIFIABLE)
604604
# Seer Scanner Auto-trigger rate (max number of scans auto-triggered per project per hour)
605605
register(
606-
"seer.max_num_scanner_autotriggered_per_hour", default=1000, flags=FLAG_AUTOMATOR_MODIFIABLE
606+
"seer.max_num_scanner_autotriggered_per_hour", default=2500, flags=FLAG_AUTOMATOR_MODIFIABLE
607607
)
608608

609609
# Codecov Integration

src/sentry/profiles/task.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,11 +1314,12 @@ def _process_vroomrs_chunk_profile(profile: Profile) -> bool:
13141314
functions = chunk.extract_functions_metrics(
13151315
min_depth=1, filter_system_frames=True, max_unique_functions=100
13161316
)
1317-
payload = build_chunk_functions_kafka_message(chunk, functions)
1318-
topic = ArroyoTopic(
1319-
get_topic_definition(Topic.PROFILES_CALL_TREE)["real_topic_name"]
1320-
)
1321-
profile_functions_producer.produce(topic, payload)
1317+
if functions is not None and len(functions) > 0:
1318+
payload = build_chunk_functions_kafka_message(chunk, functions)
1319+
topic = ArroyoTopic(
1320+
get_topic_definition(Topic.PROFILES_CALL_TREE)["real_topic_name"]
1321+
)
1322+
profile_functions_producer.produce(topic, payload)
13221323
return True
13231324
except Exception as e:
13241325
sentry_sdk.capture_exception(e)

src/sentry/tasks/post_process.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,15 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
16001600
if not seer_enabled:
16011601
return
16021602

1603+
from sentry import quotas
1604+
from sentry.constants import DataCategory
1605+
1606+
has_budget: bool = quotas.backend.has_available_reserved_budget(
1607+
org_id=group.organization.id, data_category=DataCategory.SEER_SCANNER
1608+
)
1609+
if not has_budget:
1610+
return
1611+
16031612
from sentry.autofix.utils import is_seer_scanner_rate_limited
16041613

16051614
is_rate_limited, current, limit = is_seer_scanner_rate_limited(project, group.organization)
@@ -1613,15 +1622,6 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
16131622
logger.error("Seer scanner auto-trigger rate limit hit")
16141623
return
16151624

1616-
from sentry import quotas
1617-
from sentry.constants import DataCategory
1618-
1619-
has_budget: bool = quotas.backend.has_available_reserved_budget(
1620-
org_id=group.organization.id, data_category=DataCategory.SEER_SCANNER
1621-
)
1622-
if not has_budget:
1623-
return
1624-
16251625
start_seer_automation.delay(group.id)
16261626

16271627

src/sentry/tasks/statistical_detectors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ def _detect_transaction_change_points(
430430
max_retries=0,
431431
taskworker_config=TaskworkerConfig(
432432
namespace=profiling_tasks,
433+
processing_deadline_duration=30,
433434
),
434435
)
435436
def detect_function_trends(project_ids: list[int], start: str, *args, **kwargs) -> None:

src/sentry/users/api/endpoints/user_details.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class UserOptionsSerializer(serializers.Serializer[UserOption]):
8282
prefersNextjsInsightsOverview = serializers.BooleanField(required=False)
8383
prefersStackedNavigation = serializers.BooleanField(required=False)
8484
prefersChonkUI = serializers.BooleanField(required=False)
85+
prefersAgentsInsightsModule = serializers.BooleanField(required=False)
8586

8687
quickStartDisplay = serializers.JSONField(
8788
required=False,
@@ -260,6 +261,7 @@ def put(self, request: Request, user: User) -> Response:
260261
"prefersStackedNavigation": "prefers_stacked_navigation",
261262
"prefersNextjsInsightsOverview": "prefers_nextjs_insights_overview",
262263
"prefersChonkUI": "prefers_chonk_ui",
264+
"prefersAgentsInsightsModule": "prefers_agents_insights_module",
263265
"quickStartDisplay": "quick_start_display",
264266
}
265267

src/sentry/users/api/serializers/user.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class _UserOptions(TypedDict):
6969
prefersStackedNavigation: bool | None
7070
prefersChonkUI: bool
7171
quickStartDisplay: dict[str, int]
72+
prefersAgentsInsightsModule: bool
7273

7374

7475
class UserSerializerResponseOptional(TypedDict, total=False):
@@ -208,6 +209,7 @@ def serialize(
208209
"prefersStackedNavigation": options.get("prefers_stacked_navigation"),
209210
"prefersChonkUI": options.get("prefers_chonk_ui", False),
210211
"quickStartDisplay": options.get("quick_start_display") or {},
212+
"prefersAgentsInsightsModule": options.get("prefers_agents_insights_module", True),
211213
}
212214

213215
d["flags"] = {"newsletter_consent_prompt": bool(obj.flags.newsletter_consent_prompt)}

src/sentry/users/models/user_option.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ class UserOption(Model):
169169
- Whether the user prefers the new stacked navigation experience (boolean)
170170
- prefers_nextjs_insights_overview
171171
- Whether the user prefers the new NextJS insights overview experience (boolean)
172+
- prefers_agents_insights_module
173+
- Whether the user prefers the new Agents insights module experience (boolean)
172174
- prefers_chonk_ui
173175
- Whether the user prefers the new Chonk UI experience (boolean)
174176
- quick_start_display

static/app/components/sidebar/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {useLocation} from 'sentry/utils/useLocation';
5252
import useMedia from 'sentry/utils/useMedia';
5353
import useOrganization from 'sentry/utils/useOrganization';
5454
import {makeAlertsPathname} from 'sentry/views/alerts/pathnames';
55-
import {AgentInsightsFeature} from 'sentry/views/insights/agentMonitoring/utils/features';
55+
import {AIInsightsFeature} from 'sentry/views/insights/agentMonitoring/utils/features';
5656
import {MODULE_BASE_URLS} from 'sentry/views/insights/common/utils/useModuleURL';
5757
import {
5858
AGENTS_LANDING_SUB_PATH,
@@ -373,7 +373,7 @@ function Sidebar() {
373373
id="performance-domains-mobile"
374374
icon={<SubitemDot collapsed />}
375375
/>
376-
<AgentInsightsFeature
376+
<AIInsightsFeature
377377
organization={organization}
378378
renderDisabled={() => (
379379
<SidebarItem
@@ -392,7 +392,7 @@ function Sidebar() {
392392
id="performance-domains-agents"
393393
icon={<SubitemDot collapsed />}
394394
/>
395-
</AgentInsightsFeature>
395+
</AIInsightsFeature>
396396
<SidebarItem
397397
{...sidebarItemProps}
398398
label={t('Crons')}

0 commit comments

Comments
 (0)