Skip to content

Commit

Permalink
chore(insights): removes unused performance score flag checks (#74504)
Browse files Browse the repository at this point in the history
Removes `organizations:insights-browser-webvitals-optional-components`
and `organizations:insights-default-performance-score-profiles` since
these flags have been GA'd and no longer needed.
  • Loading branch information
edwardgou-sentry authored Jul 19, 2024
1 parent 3deaf1b commit 8c04ccf
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 111 deletions.
83 changes: 36 additions & 47 deletions src/sentry/relay/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,7 @@ def _should_extract_abnormal_mechanism(project: Project) -> bool:
)


def _should_performance_profiles_web_vitals_be_optional(organization: Organization) -> bool:
return features.has(
"organizations:insights-browser-webvitals-optional-components", organization
)


def _get_desktop_browser_performance_profiles(organization: Organization) -> list[dict[str, Any]]:
optional = _should_performance_profiles_web_vitals_be_optional(organization)
return [
{
"name": "Chrome",
Expand All @@ -420,28 +413,28 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 1200.0,
"p50": 2400.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -458,7 +451,7 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
Expand All @@ -479,7 +472,7 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -496,7 +489,7 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
Expand All @@ -517,7 +510,7 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -534,28 +527,28 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 1200.0,
"p50": 2400.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -572,28 +565,28 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 1200.0,
"p50": 2400.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand Down Expand Up @@ -667,7 +660,6 @@ def _get_desktop_browser_performance_profiles(organization: Organization) -> lis


def _get_mobile_browser_performance_profiles(organization: Organization) -> list[dict[str, Any]]:
optional = _should_performance_profiles_web_vitals_be_optional(organization)
return [
{
"name": "Chrome Mobile",
Expand All @@ -677,28 +669,28 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.15,
"p10": 1800.0,
"p50": 3000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 2500.0,
"p50": 4000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 800.0,
"p50": 1800.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -715,7 +707,7 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.15,
"p10": 1800.0,
"p50": 3000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
Expand All @@ -736,7 +728,7 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.10,
"p10": 800.0,
"p50": 1800.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -753,7 +745,7 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.15,
"p10": 1800.0,
"p50": 3000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
Expand All @@ -774,7 +766,7 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.10,
"p10": 800.0,
"p50": 1800.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -791,28 +783,28 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.15,
"p10": 1800.0,
"p50": 3000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 2500.0,
"p50": 4000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 800.0,
"p50": 1800.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand All @@ -829,28 +821,28 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list
"weight": 0.15,
"p10": 1800.0,
"p50": 3000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 2500.0,
"p50": 4000.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 800.0,
"p50": 1800.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand Down Expand Up @@ -919,9 +911,6 @@ def _get_mobile_browser_performance_profiles(organization: Organization) -> list


def _get_default_browser_performance_profiles(organization: Organization) -> list[dict[str, Any]]:
if not features.has("organizations:insights-default-performance-score-profiles", organization):
return []
optional = _should_performance_profiles_web_vitals_be_optional(organization)
return [
{
"name": "Default",
Expand All @@ -931,28 +920,28 @@ def _get_default_browser_performance_profiles(organization: Organization) -> lis
"weight": 0.15,
"p10": 900.0,
"p50": 1600.0,
"optional": optional,
"optional": True,
},
{
"measurement": "lcp",
"weight": 0.30,
"p10": 1200.0,
"p50": 2400.0,
"optional": optional,
"optional": True,
},
{
"measurement": "cls",
"weight": 0.15,
"p10": 0.1,
"p50": 0.25,
"optional": optional,
"optional": True,
},
{
"measurement": "ttfb",
"weight": 0.10,
"p10": 200.0,
"p50": 400.0,
"optional": optional,
"optional": True,
},
],
"condition": {
Expand Down
Loading

0 comments on commit 8c04ccf

Please sign in to comment.