|
@@ -21,10 +21,11 @@ import {t, tct} from 'sentry/locale';
|
|
import ConfigStore from 'sentry/stores/configStore';
|
|
import ConfigStore from 'sentry/stores/configStore';
|
|
import ProjectsStore from 'sentry/stores/projectsStore';
|
|
import ProjectsStore from 'sentry/stores/projectsStore';
|
|
import {space} from 'sentry/styles/space';
|
|
import {space} from 'sentry/styles/space';
|
|
-import {Organization, Project, Scope} from 'sentry/types';
|
|
|
|
|
|
+import {IssueTitle, IssueType, Organization, Project, Scope} from 'sentry/types';
|
|
import {DynamicSamplingBiasType} from 'sentry/types/sampling';
|
|
import {DynamicSamplingBiasType} from 'sentry/types/sampling';
|
|
import {trackAnalytics} from 'sentry/utils/analytics';
|
|
import {trackAnalytics} from 'sentry/utils/analytics';
|
|
import {formatPercentage} from 'sentry/utils/formatters';
|
|
import {formatPercentage} from 'sentry/utils/formatters';
|
|
|
|
+import {safeGetQsParam} from 'sentry/utils/integrationUtil';
|
|
import {isActiveSuperuser} from 'sentry/utils/isActiveSuperuser';
|
|
import {isActiveSuperuser} from 'sentry/utils/isActiveSuperuser';
|
|
import routeTitleGen from 'sentry/utils/routeTitle';
|
|
import routeTitleGen from 'sentry/utils/routeTitle';
|
|
import DeprecatedAsyncView from 'sentry/views/deprecatedAsyncView';
|
|
import DeprecatedAsyncView from 'sentry/views/deprecatedAsyncView';
|
|
@@ -471,9 +472,11 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
return fps ? `${Math.floor(fps / 5) * 5}fps` : '';
|
|
return fps ? `${Math.floor(fps / 5) * 5}fps` : '';
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const issueType = safeGetQsParam('issueType');
|
|
|
|
+
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
- title: t('N+1 DB Queries'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.N_PLUS_DB_DURATION,
|
|
name: DetectorConfigCustomer.N_PLUS_DB_DURATION,
|
|
@@ -481,7 +484,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Total Duration'),
|
|
label: t('Minimum Total Duration'),
|
|
defaultValue: 100, // ms
|
|
defaultValue: 100, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 100ms, means that an eligible event will be stored as a N+1 DB Query Issue only if the total duration of the involved spans exceeds 100ms'
|
|
|
|
|
|
+ 'Setting the value to 100ms, means that an eligible event will be detected as a N+1 DB Query Issue only if the total duration of the involved spans exceeds 100ms'
|
|
),
|
|
),
|
|
allowedValues: allowedDurationValues,
|
|
allowedValues: allowedDurationValues,
|
|
disabled: !(
|
|
disabled: !(
|
|
@@ -494,9 +497,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Slow DB Queries'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_SLOW_DB_QUERY,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.SLOW_DB_DURATION,
|
|
name: DetectorConfigCustomer.SLOW_DB_DURATION,
|
|
@@ -504,7 +508,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Duration'),
|
|
label: t('Minimum Duration'),
|
|
defaultValue: 1000, // ms
|
|
defaultValue: 1000, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 1s, means that an eligible event will be stored as a Slow DB Query Issue only if the duration of the involved db span exceeds 1s.'
|
|
|
|
|
|
+ 'Setting the value to 1s, means that an eligible event will be detected as a Slow DB Query Issue only if the duration of the involved db span exceeds 1s.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedDurationValues.slice(5).length - 1],
|
|
tickValues: [0, allowedDurationValues.slice(5).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -516,9 +520,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_SLOW_DB_QUERY,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('N+1 API Calls'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_N_PLUS_ONE_API_CALLS,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.N_PLUS_API_CALLS_DURATION,
|
|
name: DetectorConfigCustomer.N_PLUS_API_CALLS_DURATION,
|
|
@@ -526,7 +531,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Total Duration'),
|
|
label: t('Minimum Total Duration'),
|
|
defaultValue: 300, // ms
|
|
defaultValue: 300, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 300ms, means that an eligible event will be stored as a N+1 API Calls Issue only if the total duration of the involved spans exceeds 300ms'
|
|
|
|
|
|
+ 'Setting the value to 300ms, means that an eligible event will be detected as a N+1 API Calls Issue only if the total duration of the involved spans exceeds 300ms'
|
|
),
|
|
),
|
|
allowedValues: allowedDurationValues.slice(5),
|
|
allowedValues: allowedDurationValues.slice(5),
|
|
disabled: !(
|
|
disabled: !(
|
|
@@ -540,9 +545,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Large Render Blocking Asset'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_RENDER_BLOCKING_ASSET,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.RENDER_BLOCKING_ASSET_RATIO,
|
|
name: DetectorConfigCustomer.RENDER_BLOCKING_ASSET_RATIO,
|
|
@@ -550,7 +556,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum FCP Ratio'),
|
|
label: t('Minimum FCP Ratio'),
|
|
defaultValue: 0.33,
|
|
defaultValue: 0.33,
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 33%, means that an eligible event will be stored as a Large Render Blocking Asset Issue only if the duration of the involved span is at least 33% of First Contentful Paint (FCP).'
|
|
|
|
|
|
+ 'Setting the value to 33%, means that an eligible event will be detected as a Large Render Blocking Asset Issue only if the duration of the involved span is at least 33% of First Contentful Paint (FCP).'
|
|
),
|
|
),
|
|
allowedValues: allowedPercentageValues,
|
|
allowedValues: allowedPercentageValues,
|
|
tickValues: [0, allowedPercentageValues.length - 1],
|
|
tickValues: [0, allowedPercentageValues.length - 1],
|
|
@@ -563,9 +569,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_RENDER_BLOCKING_ASSET,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Large HTTP Payload'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_LARGE_HTTP_PAYLOAD,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.LARGE_HTT_PAYLOAD_SIZE,
|
|
name: DetectorConfigCustomer.LARGE_HTT_PAYLOAD_SIZE,
|
|
@@ -573,7 +580,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Size'),
|
|
label: t('Minimum Size'),
|
|
defaultValue: 1000000, // 1MB in bytes
|
|
defaultValue: 1000000, // 1MB in bytes
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 1MB, means that an eligible event will be stored as a Large HTTP Payload Issue only if the involved HTTP span has a payload size that exceeds 1MB.'
|
|
|
|
|
|
+ 'Setting the value to 1MB, means that an eligible event will be detected as a Large HTTP Payload Issue only if the involved HTTP span has a payload size that exceeds 1MB.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedSizeValues.slice(1).length - 1],
|
|
tickValues: [0, allowedSizeValues.slice(1).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -586,9 +593,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_LARGE_HTTP_PAYLOAD,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('DB on Main Thread'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_DB_MAIN_THREAD,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.DB_ON_MAIN_THREAD_DURATION,
|
|
name: DetectorConfigCustomer.DB_ON_MAIN_THREAD_DURATION,
|
|
@@ -596,7 +604,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Frame Rate Drop'),
|
|
label: t('Frame Rate Drop'),
|
|
defaultValue: 16, // ms
|
|
defaultValue: 16, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 60fps, means that an eligible event will be stored as a DB on Main Thread Issue only if database spans on the main thread cause frame rate to drop below 60fps.'
|
|
|
|
|
|
+ 'Setting the value to 60fps, means that an eligible event will be detected as a DB on Main Thread Issue only if database spans on the main thread cause frame rate to drop below 60fps.'
|
|
),
|
|
),
|
|
tickValues: [0, 3],
|
|
tickValues: [0, 3],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -608,9 +616,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_DB_MAIN_THREAD,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('File I/O on Main Thread'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_FILE_IO_MAIN_THREAD,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.FILE_IO_MAIN_THREAD_DURATION,
|
|
name: DetectorConfigCustomer.FILE_IO_MAIN_THREAD_DURATION,
|
|
@@ -618,7 +627,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Frame Rate Drop'),
|
|
label: t('Frame Rate Drop'),
|
|
defaultValue: 16, // ms
|
|
defaultValue: 16, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 60fps, means that an eligible event will be stored as a File I/O on Main Thread Issue only if File I/O spans on the main thread cause frame rate to drop below 60fps.'
|
|
|
|
|
|
+ 'Setting the value to 60fps, means that an eligible event will be detected as a File I/O on Main Thread Issue only if File I/O spans on the main thread cause frame rate to drop below 60fps.'
|
|
),
|
|
),
|
|
tickValues: [0, 3],
|
|
tickValues: [0, 3],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -630,9 +639,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_FILE_IO_MAIN_THREAD,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Consecutive DB Queries'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.CONSECUTIVE_DB_MIN_TIME_SAVED,
|
|
name: DetectorConfigCustomer.CONSECUTIVE_DB_MIN_TIME_SAVED,
|
|
@@ -640,7 +650,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Time Saved'),
|
|
label: t('Minimum Time Saved'),
|
|
defaultValue: 100, // ms
|
|
defaultValue: 100, // ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 100ms, means that an eligible event will be stored as a Consecutive DB Queries Issue only if the time saved by parallelizing the queries exceeds 100ms.'
|
|
|
|
|
|
+ 'Setting the value to 100ms, means that an eligible event will be detected as a Consecutive DB Queries Issue only if the time saved by parallelizing the queries exceeds 100ms.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedDurationValues.slice(0, 23).length - 1],
|
|
tickValues: [0, allowedDurationValues.slice(0, 23).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -652,9 +662,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Uncompressed Asset'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_UNCOMPRESSED_ASSET,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.UNCOMPRESSED_ASSET_SIZE,
|
|
name: DetectorConfigCustomer.UNCOMPRESSED_ASSET_SIZE,
|
|
@@ -662,7 +673,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Size'),
|
|
label: t('Minimum Size'),
|
|
defaultValue: 512000, // in kilobytes
|
|
defaultValue: 512000, // in kilobytes
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 512KB, means that an eligible event will be stored as an Uncompressed Asset Issue only if the size of the uncompressed asset being transferred exceeds 512KB.'
|
|
|
|
|
|
+ 'Setting the value to 512KB, means that an eligible event will be detected as an Uncompressed Asset Issue only if the size of the uncompressed asset being transferred exceeds 512KB.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedSizeValues.slice(1).length - 1],
|
|
tickValues: [0, allowedSizeValues.slice(1).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -680,7 +691,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Duration'),
|
|
label: t('Minimum Duration'),
|
|
defaultValue: 500, // in ms
|
|
defaultValue: 500, // in ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 500ms, means that an eligible event will be stored as an Uncompressed Asset Issue only if the duration of the span responsible for transferring the uncompressed asset exceeds 500ms.'
|
|
|
|
|
|
+ 'Setting the value to 500ms, means that an eligible event will be detected as an Uncompressed Asset Issue only if the duration of the span responsible for transferring the uncompressed asset exceeds 500ms.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedDurationValues.slice(5).length - 1],
|
|
tickValues: [0, allowedDurationValues.slice(5).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -693,9 +704,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_UNCOMPRESSED_ASSET,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('Consecutive HTTP'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_CONSECUTIVE_HTTP,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.CONSECUTIVE_HTTP_MIN_TIME_SAVED,
|
|
name: DetectorConfigCustomer.CONSECUTIVE_HTTP_MIN_TIME_SAVED,
|
|
@@ -703,7 +715,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
label: t('Minimum Time Saved'),
|
|
label: t('Minimum Time Saved'),
|
|
defaultValue: 2000, // in ms
|
|
defaultValue: 2000, // in ms
|
|
help: t(
|
|
help: t(
|
|
- 'Setting the value to 2s, means that an eligible event will be stored as a Consecutive HTTP Issue only if the time saved by parallelizing the http spans exceeds 2s.'
|
|
|
|
|
|
+ 'Setting the value to 2s, means that an eligible event will be detected as a Consecutive HTTP Issue only if the time saved by parallelizing the http spans exceeds 2s.'
|
|
),
|
|
),
|
|
tickValues: [0, allowedDurationValues.slice(14).length - 1],
|
|
tickValues: [0, allowedDurationValues.slice(14).length - 1],
|
|
showTickLabels: true,
|
|
showTickLabels: true,
|
|
@@ -716,9 +728,10 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_CONSECUTIVE_HTTP,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: t('HTTP Overhead'),
|
|
|
|
|
|
+ title: IssueTitle.PERFORMANCE_HTTP_OVERHEAD,
|
|
fields: [
|
|
fields: [
|
|
{
|
|
{
|
|
name: DetectorConfigCustomer.HTTP_OVERHEAD_REQUEST_DELAY,
|
|
name: DetectorConfigCustomer.HTTP_OVERHEAD_REQUEST_DELAY,
|
|
@@ -738,6 +751,7 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
disabledReason,
|
|
disabledReason,
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ initiallyCollapsed: issueType !== IssueType.PERFORMANCE_HTTP_OVERHEAD,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
};
|
|
};
|
|
@@ -966,7 +980,6 @@ class ProjectPerformance extends DeprecatedAsyncView<Props, State> {
|
|
<StyledJsonForm
|
|
<StyledJsonForm
|
|
forms={this.project_owner_detector_settings(hasAccess)}
|
|
forms={this.project_owner_detector_settings(hasAccess)}
|
|
collapsible
|
|
collapsible
|
|
- initiallyCollapsed
|
|
|
|
/>
|
|
/>
|
|
<StyledPanelFooter>
|
|
<StyledPanelFooter>
|
|
<Actions>
|
|
<Actions>
|