import {Fragment} from 'react';
import styled from '@emotion/styled';
import FeatureBadge from 'sentry/components/badge/featureBadge';
import {Breadcrumbs} from 'sentry/components/breadcrumbs';
import ButtonBar from 'sentry/components/buttonBar';
import FeedbackWidgetButton from 'sentry/components/feedback/widget/feedbackWidgetButton';
import * as Layout from 'sentry/components/layouts/thirds';
import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import {DurationUnit} from 'sentry/utils/discover/fields';
import {decodeScalar} from 'sentry/utils/queryString';
import {useLocation} from 'sentry/utils/useLocation';
import useOrganization from 'sentry/utils/useOrganization';
import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/utils/useOnboardingProject';
import {MetricReadout} from 'sentry/views/performance/metricReadout';
import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
import Onboarding from 'sentry/views/performance/onboarding';
import {LatencyChart} from 'sentry/views/performance/queues/charts/latencyChart';
import {ThroughputChart} from 'sentry/views/performance/queues/charts/throughputChart';
import {MessageSpanSamplesPanel} from 'sentry/views/performance/queues/destinationSummary/messageSpanSamplesPanel';
import {TransactionsTable} from 'sentry/views/performance/queues/destinationSummary/transactionsTable';
import {useQueuesMetricsQuery} from 'sentry/views/performance/queues/queries/useQueuesMetricsQuery';
import {Referrer} from 'sentry/views/performance/queues/referrers';
import {DESTINATION_TITLE, RELEASE_LEVEL} from 'sentry/views/performance/queues/settings';
import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
import {getTimeSpentExplanation} from 'sentry/views/starfish/components/tableCells/timeSpentCell';
function DestinationSummaryPage() {
const organization = useOrganization();
const onboardingProject = useOnboardingProject();
const {query} = useLocation();
const destination = decodeScalar(query.destination);
const {data, isLoading} = useQueuesMetricsQuery({
destination,
referrer: Referrer.QUEUES_SUMMARY,
});
const errorRate = 1 - (data[0]?.['trace_status_rate(ok)'] ?? 0);
const crumbs = useModuleBreadcrumbs('queue');
return (
{destination}
{!onboardingProject && (
)}
{onboardingProject && (
)}
{!onboardingProject && (
)}
);
}
function PageWithProviders() {
return (
);
}
export default PageWithProviders;
const Flex = styled('div')`
display: flex;
flex-direction: column;
gap: ${space(2)};
`;
const MetricsRibbon = styled('div')`
display: flex;
flex-wrap: wrap;
gap: ${space(4)};
`;
const HeaderContainer = styled('div')`
display: flex;
justify-content: space-between;
`;