-
- {this.renderProjectPageControl()}
- {this.renderEstimationDisclaimer()}
-
+ {this.renderProjectPageControl()}
{showProfilingBanner && }
{this.renderUsageStatsOrg()}
@@ -470,9 +437,3 @@ const PageControl = styled('div')`
grid-template-columns: minmax(0, 1fr);
}
`;
-
-const EstimationText = styled('div')`
- color: ${p => p.theme.subText};
- font-size: ${p => p.theme.fontSize.sm};
- line-height: ${p => p.theme.text.lineHeightBody};
-`;
diff --git a/static/app/views/organizationStats/mapSeriesToChart.spec.ts b/static/app/views/organizationStats/mapSeriesToChart.spec.ts
index bfa27da2e2347b..3631dbf518a242 100644
--- a/static/app/views/organizationStats/mapSeriesToChart.spec.ts
+++ b/static/app/views/organizationStats/mapSeriesToChart.spec.ts
@@ -251,141 +251,4 @@ describe('mapSeriesToChart func', () => {
// should format client discard data correctly
expect(mappedSeries.cardStats.clientDiscard).toBe('1.5K');
});
-
- it('should correctly sum up the profile chunks', () => {
- const mappedSeries = mapSeriesToChart({
- orgStats: {
- start: '2021-01-01T00:00:00Z',
- end: '2021-01-07T00:00:00Z',
- intervals: ['2021-01-01T00:00:00Z', '2021-01-02T00:00:00Z'],
- groups: [
- {
- by: {
- outcome: 'invalid',
- reason: 'bad',
- category: 'profile_chunk',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [1, 2],
- },
- },
- {
- by: {
- outcome: 'accepted',
- reason: 'good',
- category: 'profile_chunk',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [3, 4],
- },
- },
- {
- by: {
- outcome: 'accepted',
- reason: 'good',
- category: 'profile_duration',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [1, 2],
- },
- },
- ],
- },
- chartDateInterval: '1h',
- chartDateUtc: true,
- dataCategory: DataCategory.PROFILE_DURATION,
- endpointQuery: {},
- });
-
- // multiplies dropped profile chunks by 9000
- expect(mappedSeries.chartStats.invalid).toEqual([
- {value: ['Jan 1 12:00 AM - 1:00 AM (+00:00)', 9000]},
- {value: ['Jan 2 12:00 AM - 1:00 AM (+00:00)', 18000]},
- ]);
-
- // does not add accepted profile chunks to accepted profile duration
- expect(mappedSeries.chartStats.accepted).toEqual([
- {value: ['Jan 1 12:00 AM - 1:00 AM (+00:00)', 1]},
- {value: ['Jan 2 12:00 AM - 1:00 AM (+00:00)', 2]},
- ]);
- });
-
- it('should correctly sum up the profiles', () => {
- const groups = [
- {
- by: {
- outcome: 'invalid',
- reason: 'bad',
- category: 'profile',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [1, 2],
- },
- },
- {
- by: {
- outcome: 'accepted',
- reason: 'good',
- category: 'profile',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [3, 4],
- },
- },
- {
- by: {
- outcome: 'accepted',
- reason: 'good',
- category: 'profile_duration',
- },
- totals: {
- 'sum(quantity)': 10,
- },
- series: {
- 'sum(quantity)': [1, 2],
- },
- },
- ];
-
- const mappedSeries = mapSeriesToChart({
- orgStats: {
- start: '2021-01-01T00:00:00Z',
- end: '2021-01-07T00:00:00Z',
- intervals: ['2021-01-01T00:00:00Z', '2021-01-02T00:00:00Z'],
- groups,
- },
- chartDateInterval: '1h',
- chartDateUtc: true,
- dataCategory: DataCategory.PROFILE_DURATION,
- shouldEstimateDroppedProfiles: true,
- endpointQuery: {},
- });
-
- // multiplies dropped profiles by 9000
- expect(mappedSeries.chartStats.invalid).toEqual([
- {value: ['Jan 1 12:00 AM - 1:00 AM (+00:00)', 9000]},
- {value: ['Jan 2 12:00 AM - 1:00 AM (+00:00)', 18000]},
- ]);
-
- // does not add accepted profiles to accepted profile duration
- expect(mappedSeries.chartStats.accepted).toEqual([
- {value: ['Jan 1 12:00 AM - 1:00 AM (+00:00)', 1]},
- {value: ['Jan 2 12:00 AM - 1:00 AM (+00:00)', 2]},
- ]);
- });
});
diff --git a/static/app/views/organizationStats/mapSeriesToChart.ts b/static/app/views/organizationStats/mapSeriesToChart.ts
index e3be58696fc817..786fdd0da86aaf 100644
--- a/static/app/views/organizationStats/mapSeriesToChart.ts
+++ b/static/app/views/organizationStats/mapSeriesToChart.ts
@@ -13,39 +13,18 @@ import type {ChartStats} from './usageChart';
import {SeriesTypes} from './usageChart';
import {formatUsageWithUnits, getFormatUsageOptions} from './utils';
-// used for estimated dropped continuous profile hours and ui profile hours from profile chunks and profile chunks ui
-export function droppedProfileChunkMultiplier(
- category: number | string | undefined,
- outcome: number | string | undefined,
- shouldEstimateDroppedProfiles?: boolean
-) {
- if (
- category === 'profile_chunk' ||
- category === 'profile_chunk_ui' ||
- (shouldEstimateDroppedProfiles && category === 'profile')
- ) {
- if (outcome === Outcome.ACCEPTED) {
- return 0;
- }
- return 9000;
- }
- return 1;
-}
-
export function mapSeriesToChart({
orgStats,
dataCategory,
chartDateUtc,
endpointQuery,
chartDateInterval,
- shouldEstimateDroppedProfiles = false,
}: {
chartDateInterval: IntervalPeriod;
chartDateUtc: boolean;
dataCategory: DataCategory;
endpointQuery: Record;
orgStats?: UsageSeries;
- shouldEstimateDroppedProfiles?: boolean;
}): {
cardStats: {
accepted?: string;
@@ -124,13 +103,10 @@ export function mapSeriesToChart({
countAcceptedStored += group.totals['sum(quantity)']!;
}
} else {
- const value =
- group.totals['sum(quantity)']! *
- droppedProfileChunkMultiplier(category, outcome, shouldEstimateDroppedProfiles);
if (outcome !== Outcome.CLIENT_DISCARD) {
- count.total += value;
+ count.total += group.totals['sum(quantity)']!;
}
- (count as any)[outcome!] += value;
+ (count as any)[outcome!] += group.totals['sum(quantity)']!;
}
if (category === 'span_indexed' && outcome !== Outcome.ACCEPTED) {
@@ -139,9 +115,6 @@ export function mapSeriesToChart({
}
group.series['sum(quantity)']!.forEach((stat, i) => {
- stat =
- stat *
- droppedProfileChunkMultiplier(category, outcome, shouldEstimateDroppedProfiles);
const dataObject = {name: orgStats.intervals[i]!, value: stat};
const strigfiedReason = String(group.by.reason ?? '');
diff --git a/static/app/views/organizationStats/usageStatsOrg.tsx b/static/app/views/organizationStats/usageStatsOrg.tsx
index d10159a90b81bc..846e58d826b883 100644
--- a/static/app/views/organizationStats/usageStatsOrg.tsx
+++ b/static/app/views/organizationStats/usageStatsOrg.tsx
@@ -51,7 +51,7 @@ import UsageChart, {
SeriesTypes,
} from './usageChart';
import UsageStatsPerMin from './usageStatsPerMin';
-import {isContinuousProfiling, isDisplayUtc} from './utils';
+import {isDisplayUtc} from './utils';
type ChartData = {
cardStats: {
@@ -110,12 +110,6 @@ export function getEndpointQuery({
groupBy.push('category');
category.push('span_indexed');
}
- if (['profile_duration', 'profile_duration_ui'].includes(dataCategoryApiName)) {
- groupBy.push('category');
- category.push(
- dataCategoryApiName === 'profile_duration' ? 'profile_chunk' : 'profile_chunk_ui'
- );
- }
return {
...queryDatetime,
@@ -293,7 +287,6 @@ function ScoreCards({
score={loading ? undefined : card.score}
help={card.help}
trend={card.trend}
- isEstimate={card.isEstimate}
isTooltipHoverable
/>
));
@@ -342,7 +335,6 @@ type CardMetadata = Record<
{
title: React.ReactNode;
help?: React.ReactNode;
- isEstimate?: boolean;
score?: string;
trend?: React.ReactNode;
}
@@ -530,7 +522,6 @@ function UsageStatsOrganization({
const cardMetadata: CardMetadata = useMemo(() => {
const {total, accepted, accepted_stored, invalid, rateLimited, filtered} =
chartData.cardStats;
- const shouldShowEstimate = isContinuousProfiling(dataCategory);
return {
total: {
@@ -582,7 +573,6 @@ function UsageStatsOrganization({
}
),
score: filtered,
- isEstimate: shouldShowEstimate,
},
rateLimited: {
title: tct('Rate Limited [dataCategory]', {dataCategory: dataCategoryName}),
@@ -599,7 +589,6 @@ function UsageStatsOrganization({
}
),
score: rateLimited,
- isEstimate: shouldShowEstimate,
},
invalid: {
title: tct('Invalid [dataCategory]', {dataCategory: dataCategoryName}),
@@ -616,7 +605,6 @@ function UsageStatsOrganization({
}
),
score: invalid,
- isEstimate: shouldShowEstimate,
},
};
}, [
diff --git a/static/app/views/organizationStats/usageStatsProjects.tsx b/static/app/views/organizationStats/usageStatsProjects.tsx
index 977c5bb1c50fd6..097b5ebd2d72d7 100644
--- a/static/app/views/organizationStats/usageStatsProjects.tsx
+++ b/static/app/views/organizationStats/usageStatsProjects.tsx
@@ -23,7 +23,6 @@ import {hasDynamicSamplingCustomFeature} from 'sentry/utils/dynamicSampling/feat
import {useApiQuery} from 'sentry/utils/queryClient';
import useOrganization from 'sentry/utils/useOrganization';
import useProjects from 'sentry/utils/useProjects';
-import {droppedProfileChunkMultiplier} from 'sentry/views/organizationStats/mapSeriesToChart';
import type {UsageSeries} from './types';
import type {TableStat} from './usageTable';
@@ -98,17 +97,6 @@ export function UsageStatsProjects({
groupBy.push('category');
category.push(DataCategoryExact.SPAN_INDEXED);
}
- if (
- dataCategory.name === DataCategoryExact.PROFILE_DURATION ||
- dataCategory.name === DataCategoryExact.PROFILE_DURATION_UI
- ) {
- groupBy.push('category');
- category.push(
- dataCategory.name === DataCategoryExact.PROFILE_DURATION
- ? DataCategoryExact.PROFILE_CHUNK
- : DataCategoryExact.PROFILE_CHUNK_UI
- );
- }
// We do not need more granularity in the data so interval is '1d'
return {
@@ -283,9 +271,6 @@ export function UsageStatsProjects({
const {outcome, category, project: projectId} = group.by;
// Backend enum is singlar. Frontend enum is plural.
- const multiplier = droppedProfileChunkMultiplier(category, outcome);
- const value = group.totals['sum(quantity)']! * multiplier;
-
if (category === 'span_indexed' && outcome !== Outcome.ACCEPTED) {
// we need `span_indexed` data for `accepted_stored` only
return;
@@ -300,11 +285,11 @@ export function UsageStatsProjects({
}
if (outcome !== Outcome.CLIENT_DISCARD && category !== 'span_indexed') {
- stats[projectId!]!.total += value;
+ stats[projectId!]!.total += group.totals['sum(quantity)']!;
}
if (category === 'span_indexed' && outcome === Outcome.ACCEPTED) {
- stats[projectId!]!.accepted_stored += value;
+ stats[projectId!]!.accepted_stored += group.totals['sum(quantity)']!;
return;
}
@@ -313,7 +298,7 @@ export function UsageStatsProjects({
outcome === Outcome.FILTERED ||
outcome === Outcome.INVALID
) {
- stats[projectId!]![outcome] += value;
+ stats[projectId!]![outcome] += group.totals['sum(quantity)']!;
}
if (
@@ -321,7 +306,7 @@ export function UsageStatsProjects({
outcome === Outcome.CARDINALITY_LIMITED ||
outcome === Outcome.ABUSE
) {
- stats[projectId!]![SortBy.RATE_LIMITED] += value;
+ stats[projectId!]![SortBy.RATE_LIMITED] += group.totals['sum(quantity)']!;
}
});
diff --git a/static/app/views/organizationStats/utils.tsx b/static/app/views/organizationStats/utils.tsx
index 0c40c04752757f..33957e1ec1ff99 100644
--- a/static/app/views/organizationStats/utils.tsx
+++ b/static/app/views/organizationStats/utils.tsx
@@ -154,10 +154,3 @@ export function getPaginationPageLink({
nextOffset < numRows
}"; cursor="0:${nextOffset}:0"`;
}
-
-export function isContinuousProfiling(dataCategory: DataCategory | string) {
- return (
- dataCategory === DataCategory.PROFILE_DURATION ||
- dataCategory === DataCategory.PROFILE_DURATION_UI
- );
-}
diff --git a/static/gsApp/hooks/spendVisibility/enhancedUsageStatsOrganization.tsx b/static/gsApp/hooks/spendVisibility/enhancedUsageStatsOrganization.tsx
index 1331708139c916..f7e624b40259a3 100644
--- a/static/gsApp/hooks/spendVisibility/enhancedUsageStatsOrganization.tsx
+++ b/static/gsApp/hooks/spendVisibility/enhancedUsageStatsOrganization.tsx
@@ -29,7 +29,7 @@ import {
} from 'sentry/views/organizationStats/utils';
import withSubscription from 'getsentry/components/withSubscription';
-import {PlanTier, type Subscription} from 'getsentry/types';
+import {type Subscription} from 'getsentry/types';
import {SPIKE_PROTECTION_OPTION_DISABLED} from 'getsentry/views/spikeProtection/constants';
import {SpikeProtectionRangeLimitation} from 'getsentry/views/spikeProtection/spikeProtectionCallouts';
import SpikeProtectionHistoryTable from 'getsentry/views/spikeProtection/spikeProtectionHistoryTable';
@@ -308,19 +308,6 @@ function EnhancedUsageStatsOrganization({
has_spike_data: isSingleProject && hasAccurateSpikes,
});
- const newEndpointQuery = useMemo(() => {
- const query = endpointQuery;
-
- if (
- dataCategoryApiName === 'profile_duration' &&
- subscription.planTier !== PlanTier.AM2
- ) {
- query.category.push('profile');
- }
-
- return query;
- }, [endpointQuery, dataCategoryApiName, subscription.planTier]);
-
return (