Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:performance-issues-search", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=False)
# Detect performance issues in the new standalone spans pipeline instead of on transactions
manager.add("organizations:performance-issues-spans", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=False, api_expose=False)
# Enable internal view for bannerless MEP view
manager.add("organizations:performance-mep-bannerless-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Re-enable histograms for Metrics Enhanced Performance Views
manager.add("organizations:performance-mep-reintroduce-histograms", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable MongoDB support for the Queries module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export type DashboardWidgetQuerySelectorModalOptions = {
dashboardFilters: DashboardFilters | undefined;
organization: Organization;
widget: Widget;
isMetricsData?: boolean;
};

type Props = ModalRenderProps &
Expand All @@ -34,8 +33,7 @@ type Props = ModalRenderProps &
};

function DashboardWidgetQuerySelectorModal(props: Props) {
const {organization, widget, selection, isMetricsData, Body, Header, dashboardFilters} =
props;
const {organization, widget, selection, Body, Header, dashboardFilters} = props;

const renderQueries = () => {
const querySearchBars = widget.queries.map((query, index) => {
Expand All @@ -46,9 +44,7 @@ function DashboardWidgetQuerySelectorModal(props: Props) {
},
dashboardFilters,
selection,
organization,
0,
isMetricsData
organization
);
return (
<Fragment key={index}>
Expand Down
11 changes: 2 additions & 9 deletions static/app/components/modals/dataWidgetViewerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ import {
SESSION_DURATION_ALERT,
WidgetDescription,
} from 'sentry/views/dashboards/widgetCard';
import {
DashboardsMEPProvider,
useDashboardsMEPContext,
} from 'sentry/views/dashboards/widgetCard/dashboardsMEPContext';
import {DashboardsMEPProvider} from 'sentry/views/dashboards/widgetCard/dashboardsMEPContext';
import type {GenericWidgetQueriesResult} from 'sentry/views/dashboards/widgetCard/genericWidgetQueries';
import {IssueWidgetQueries} from 'sentry/views/dashboards/widgetCard/issueWidgetQueries';
import {ReleaseWidgetQueries} from 'sentry/views/dashboards/widgetCard/releaseWidgetQueries';
Expand Down Expand Up @@ -907,8 +904,6 @@ function OpenButton({
}: OpenButtonProps) {
let openLabel: string;
let path: string;
const {isMetricsData} = useDashboardsMEPContext();

switch (widget.widgetType) {
case WidgetType.ISSUE:
openLabel = t('Open in Issues');
Expand Down Expand Up @@ -940,9 +935,7 @@ function OpenButton({
{...widget, queries: [widget.queries[selectedQueryIndex]!]},
dashboardFilters,
selection,
organization,
0,
isMetricsData
organization
);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {useApi} from 'sentry/utils/useApi';
import {useNavigate} from 'sentry/utils/useNavigate';
import {useParams} from 'sentry/utils/useParams';
import {DashboardCreateLimitWrapper} from 'sentry/views/dashboards/createLimitWrapper';
import {IndexedEventsSelectionAlert} from 'sentry/views/dashboards/indexedEventsSelectionAlert';
import {
assignDefaultLayout,
assignTempId,
Expand Down Expand Up @@ -539,7 +538,6 @@ function AddToDashboardModal({
disableTableActions
/>
</WidgetCardWrapper>
<IndexedEventsSelectionAlert widget={widget} />
</MEPSettingProvider>
</DashboardsMEPProvider>
)}
Expand Down
41 changes: 10 additions & 31 deletions static/app/utils/performance/contexts/metricsCardinality.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export function MetricsCardinalityProvider(props: {
...sumsResult.tableData,
}
: null,
!!compatabilityResult.error && !!sumsResult.error,
props.organization
!!compatabilityResult.error && !!sumsResult.error
);

return (
Expand Down Expand Up @@ -173,18 +172,14 @@ export const useMetricsCardinalityContext = _useContext;
*/
function getMetricsOutcome(
dataCounts: MergedMetricsData | null,
hasOtherFallbackCondition: boolean,
organization: Organization
hasOtherFallbackCondition: boolean
) {
const fallbackOutcome: MetricDataSwitcherOutcome = {
forceTransactionsOnly: true,
};
const successOutcome: MetricDataSwitcherOutcome = {
forceTransactionsOnly: false,
};
const isOnFallbackThresolds = organization.features.includes(
'performance-mep-bannerless-ui'
);

if (!dataCounts) {
return fallbackOutcome;
Expand All @@ -195,15 +190,11 @@ function getMetricsOutcome(
return fallbackOutcome;
}

if (!dataCounts) {
return fallbackOutcome;
}

Comment on lines -198 to -201
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This confused me as to why claude removed it, it's duplicate code

if (checkNoDataFallback(dataCounts)) {
return fallbackOutcome;
}

if (checkIncompatibleData(dataCounts, isOnFallbackThresolds)) {
if (checkIncompatibleData(dataCounts)) {
return {
shouldWarnIncompatibleSDK: true,
forceTransactionsOnly: true,
Expand All @@ -219,7 +210,7 @@ function getMetricsOutcome(
};
}

if (checkIfPartialOtherData(dataCounts, isOnFallbackThresolds)) {
if (checkIfPartialOtherData(dataCounts)) {
return {
shouldNotifyUnnamedTransactions: true,
compatibleProjects,
Expand All @@ -241,16 +232,10 @@ function checkNoDataFallback(dataCounts: MergedMetricsData) {
/**
* Fallback and warn if incompatible data found (old specific SDKs).
*/
function checkIncompatibleData(
dataCounts: MergedMetricsData,
isOnFallbackThresolds: boolean
) {
function checkIncompatibleData(dataCounts: MergedMetricsData) {
const counts = normalizeCounts(dataCounts);
if (isOnFallbackThresolds) {
const ratio = counts.nullCount / counts.metricsCount;
return ratio > NULL_THRESHOLD;
}
return counts.nullCount > 0;
const ratio = counts.nullCount / counts.metricsCount;
return ratio > NULL_THRESHOLD;
}

/**
Expand All @@ -264,16 +249,10 @@ function checkIfAllOtherData(dataCounts: MergedMetricsData) {
/**
* Show metrics but warn about unnamed transactions.
*/
function checkIfPartialOtherData(
dataCounts: MergedMetricsData,
isOnFallbackThresolds: boolean
) {
function checkIfPartialOtherData(dataCounts: MergedMetricsData) {
const counts = normalizeCounts(dataCounts);
if (isOnFallbackThresolds) {
const ratio = counts.unparamCount / counts.metricsCount;
return ratio > UNPARAM_THRESHOLD;
}
return counts.unparamCount > 0;
const ratio = counts.unparamCount / counts.metricsCount;
return ratio > UNPARAM_THRESHOLD;
}

/**
Expand Down
16 changes: 0 additions & 16 deletions static/app/views/dashboards/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ import {
getCurrentPageFilters,
getMergedDashboardFilters,
hasUnsavedFilterChanges,
isWidgetUsingTransactionName,
Comment thread
wedamija marked this conversation as resolved.
resetPageFilters,
} from 'sentry/views/dashboards/utils';
import {WidgetQueryQueueProvider} from 'sentry/views/dashboards/utils/widgetQueryQueue';
Expand All @@ -83,8 +82,6 @@ import {TopBar} from 'sentry/views/navigation/topBar';
import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature';
import {generatePerformanceEventView} from 'sentry/views/performance/data';
import {MetricsDataSwitcher} from 'sentry/views/performance/landing/metricsDataSwitcher';
import {MetricsDataSwitcherAlert} from 'sentry/views/performance/landing/metricsDataSwitcherAlert';
import {DiscoverQueryPageSource} from 'sentry/views/performance/utils';

import {PrebuiltDashboardOnboardingGate} from './components/prebuiltDashboardOnboardingGate';
import {Controls} from './controls';
Expand Down Expand Up @@ -1176,10 +1173,6 @@ class DashboardDetail extends Component<Props, State> {

const eventView = generatePerformanceEventView(location, projects, {});

const isDashboardUsingTransaction = dashboard.widgets.some(
isWidgetUsingTransactionName
);

const pageContent = (
<Stack flex={1}>
<OnDemandControlProvider location={location}>
Expand Down Expand Up @@ -1263,15 +1256,6 @@ class DashboardDetail extends Component<Props, State> {
location={location}
forceTransactions={metricsDataSide.forceTransactionsOnly}
>
{isDashboardUsingTransaction ? (
<MetricsDataSwitcherAlert
organization={organization}
eventView={eventView}
projects={projects}
source={DiscoverQueryPageSource.DISCOVER}
{...metricsDataSide}
/>
) : null}
<FiltersBar
dashboard={modifiedDashboard ?? dashboard}
filters={(modifiedDashboard ?? dashboard).filters}
Expand Down

This file was deleted.

91 changes: 0 additions & 91 deletions static/app/views/dashboards/indexedEventsSelectionAlert.tsx

This file was deleted.

Loading
Loading