From 5ea3977493a5a26806bf06a0a1ca30b07860e5c1 Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Fri, 18 Jul 2025 14:11:10 -0400 Subject: [PATCH 1/4] rename to --- .../tables/tracesTable/fieldRenderers.tsx | 4 ++-- .../insights/agentMonitoring/utils/query.tsx | 6 +++--- .../resources/components/sampleImages.tsx | 4 ++-- .../components/tables/resourceSummaryTable.tsx | 4 ++-- .../components/tables/resourceTable.tsx | 4 ++-- .../getWebVitalScoresFromTableDataRow.tsx | 6 +++--- .../useTransactionWebVitalsScoresQuery.tsx | 4 ++-- .../insights/browser/webVitals/settings.ts | 4 ++-- .../insights/cache/components/samplePanel.tsx | 7 ++----- .../components/tables/spanSamplesTable.tsx | 4 ++-- .../components/tables/transactionsTable.tsx | 6 +++--- .../common/components/spanDescription.tsx | 6 +++--- .../tableCells/starredSegmentCell.tsx | 5 ++--- .../common/queries/useDiscover.spec.tsx | 10 +++++----- .../common/queries/useDiscoverSeries.spec.tsx | 18 +++++++++--------- .../common/queries/useDiscoverSeries.ts | 10 ++-------- .../queries/useTopNDiscoverMultiSeries.ts | 6 +++--- .../common/queries/useTopNDiscoverSeries.ts | 10 +++------- .../components/tables/queriesTable.tsx | 4 ++-- .../tables/queryTransactionsTable.tsx | 8 ++++---- static/app/views/insights/database/settings.ts | 8 ++------ .../tables/domainTransactionsTable.tsx | 4 ++-- .../http/components/tables/domainsTable.tsx | 4 ++-- .../components/tables/spanSamplesTable.tsx | 4 ++-- .../insights/http/queries/useSpanSamples.tsx | 4 ++-- .../components/tables/pipelinesTable.tsx | 4 ++-- .../components/startDurationWidget.tsx | 4 ++-- .../components/charts/screenBarChart.tsx | 4 ++-- .../screenload/components/metricsRibbon.tsx | 4 ++-- .../insights/mobile/screenload/constants.ts | 4 ++-- .../views/insights/mobile/screenload/utils.tsx | 4 ++-- .../screens/components/screensOverview.tsx | 6 +++--- .../components/screensOverviewTable.tsx | 6 +++--- .../app/views/insights/mobile/screens/utils.ts | 4 ++-- .../pages/backend/backendOverviewPage.tsx | 4 ++-- .../insights/pages/backend/backendTable.tsx | 4 ++-- .../views/insights/pages/backend/settings.ts | 4 ++-- .../pages/frontend/frontendOverviewPage.tsx | 4 ++-- .../pages/frontend/frontendOverviewTable.tsx | 4 ++-- .../views/insights/pages/frontend/settings.ts | 4 ++-- .../pages/mobile/mobileOverviewPage.tsx | 4 ++-- .../pages/mobile/mobileOverviewTable.tsx | 4 ++-- .../views/insights/pages/mobile/settings.ts | 4 ++-- .../pages/platform/nextjs/webVitalsWidget.tsx | 4 ++-- .../platform/shared/table/useTableData.tsx | 6 +++--- .../components/messageSpanSamplesPanel.tsx | 6 +++--- .../tables/messageSpanSamplesTable.tsx | 4 ++-- .../queues/components/tables/queuesTable.tsx | 4 ++-- .../components/tables/transactionsTable.tsx | 4 ++-- static/app/views/insights/settings.ts | 4 ++-- static/app/views/insights/types.tsx | 6 +++--- .../traceDrawer/details/transaction/index.tsx | 6 ++---- .../details/transaction/sections/builtIn.tsx | 6 ++---- .../transaction/sections/generalInfo.tsx | 6 ++---- static/app/views/performance/otlp/types.tsx | 4 ++-- .../otlp/useServiceEntrySpansQuery.tsx | 4 ++-- .../transactionSpans/spanSummary/content.tsx | 4 ++-- .../spanSummary/spanSummaryTable.tsx | 6 +++--- static/app/views/traces/fieldRenderers.tsx | 4 ++-- 59 files changed, 142 insertions(+), 166 deletions(-) diff --git a/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx b/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx index 67991368ec9ec5..2209480114b0f5 100644 --- a/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx +++ b/static/app/views/explore/tables/tracesTable/fieldRenderers.tsx @@ -23,7 +23,7 @@ import useProjects from 'sentry/utils/useProjects'; import type {TraceResult} from 'sentry/views/explore/hooks/useTraces'; import {BREAKDOWN_SLICES} from 'sentry/views/explore/hooks/useTraces'; import type {SpanResult} from 'sentry/views/explore/hooks/useTraceSpans'; -import type {EAPSpanResponse, SpanFields} from 'sentry/views/insights/types'; +import type {SpanFields, SpanResponse} from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; import {getTraceDetailsUrl} from 'sentry/views/performance/traceDetails/utils'; @@ -482,7 +482,7 @@ export function SpanTimeRenderer({ ); } -type SpanStatus = EAPSpanResponse[SpanFields.SPAN_STATUS]; +type SpanStatus = SpanResponse[SpanFields.SPAN_STATUS]; const STATUS_TO_TAG_TYPE: Record = { ok: 'success', diff --git a/static/app/views/insights/agentMonitoring/utils/query.tsx b/static/app/views/insights/agentMonitoring/utils/query.tsx index 85558fbdfadc6b..005aeaced54a3f 100644 --- a/static/app/views/insights/agentMonitoring/utils/query.tsx +++ b/static/app/views/insights/agentMonitoring/utils/query.tsx @@ -1,6 +1,6 @@ // These are the span op we are currently ingesting. -import {type EAPSpanProperty, SpanFields} from 'sentry/views/insights/types'; +import {SpanFields, type SpanProperty} from 'sentry/views/insights/types'; // AI Runs - equivalent to OTEL Invoke Agent span // https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-agent-spans.md#invoke-agent-span @@ -53,9 +53,9 @@ export const AI_TOKEN_USAGE_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_TOTAL export const AI_INPUT_TOKENS_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_INPUT_TOKENS})`; export const AI_OUTPUT_TOKENS_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS})`; export const AI_OUTPUT_TOKENS_REASONING_ATTRIBUTE_SUM = - `sum(tags[${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING}, number])` as EAPSpanProperty; + `sum(tags[${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING}, number])` as SpanProperty; export const AI_INPUT_TOKENS_CACHED_ATTRIBUTE_SUM = - `sum(tags[${SpanFields.GEN_AI_USAGE_INPUT_TOKENS_CACHED}, number])` as EAPSpanProperty; + `sum(tags[${SpanFields.GEN_AI_USAGE_INPUT_TOKENS_CACHED}, number])` as SpanProperty; export const AI_COST_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_TOTAL_COST})`; export const legacyAttributeKeys = new Map([ diff --git a/static/app/views/insights/browser/resources/components/sampleImages.tsx b/static/app/views/insights/browser/resources/components/sampleImages.tsx index a60652c493808d..14e512245a23b4 100644 --- a/static/app/views/insights/browser/resources/components/sampleImages.tsx +++ b/static/app/views/insights/browser/resources/components/sampleImages.tsx @@ -19,7 +19,7 @@ import ResourceSize from 'sentry/views/insights/browser/resources/components/res import {useResourceModuleFilters} from 'sentry/views/insights/browser/resources/utils/useResourceFilters'; import ChartPanel from 'sentry/views/insights/common/components/chartPanel'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; import {usePerformanceGeneralProjectSettings} from 'sentry/views/performance/utils'; @@ -97,7 +97,7 @@ function SampleImages({groupId, projectId}: Props) { } type ImageSpan = Pick< - EAPSpanResponse, + SpanResponse, | 'span.group' | 'raw_domain' | 'span.description' diff --git a/static/app/views/insights/browser/resources/components/tables/resourceSummaryTable.tsx b/static/app/views/insights/browser/resources/components/tables/resourceSummaryTable.tsx index 5e6aea364d4d7c..64996c094e462c 100644 --- a/static/app/views/insights/browser/resources/components/tables/resourceSummaryTable.tsx +++ b/static/app/views/insights/browser/resources/components/tables/resourceSummaryTable.tsx @@ -30,7 +30,7 @@ import { DataTitles, getThroughputTitle, } from 'sentry/views/insights/common/views/spans/types'; -import {type EAPSpanResponse, ModuleName, SpanFields} from 'sentry/views/insights/types'; +import {ModuleName, SpanFields, type SpanResponse} from 'sentry/views/insights/types'; const { RESOURCE_RENDER_BLOCKING_STATUS, @@ -41,7 +41,7 @@ const { } = SpanFields; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'avg(http.response_content_length)' | 'avg(span.self_time)' | 'epm()' diff --git a/static/app/views/insights/browser/resources/components/tables/resourceTable.tsx b/static/app/views/insights/browser/resources/components/tables/resourceTable.tsx index 6d35dc5ca5ee95..11910214a3ed86 100644 --- a/static/app/views/insights/browser/resources/components/tables/resourceTable.tsx +++ b/static/app/views/insights/browser/resources/components/tables/resourceTable.tsx @@ -39,7 +39,7 @@ import { DataTitles, getThroughputTitle, } from 'sentry/views/insights/common/views/spans/types'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {ModuleName, SpanFields, SpanFunction} from 'sentry/views/insights/types'; const { @@ -58,7 +58,7 @@ const RESOURCE_SIZE_ALERT = t( ); type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'avg(http.response_content_length)' | 'avg(span.self_time)' | 'epm()' diff --git a/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow.tsx b/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow.tsx index ed7f376711e708..f0d306540a8410 100644 --- a/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow.tsx +++ b/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow.tsx @@ -2,10 +2,10 @@ import type { ProjectScore, WebVitals, } from 'sentry/views/insights/browser/webVitals/types'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type PerformanceScores = Pick< - EAPSpanResponse, + SpanResponse, | 'performance_score(measurements.score.cls)' | 'performance_score(measurements.score.fcp)' | 'performance_score(measurements.score.inp)' @@ -14,7 +14,7 @@ type PerformanceScores = Pick< >; type CountScores = Pick< - EAPSpanResponse, + SpanResponse, | 'count_scores(measurements.score.cls)' | 'count_scores(measurements.score.fcp)' | 'count_scores(measurements.score.inp)' diff --git a/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery.tsx b/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery.tsx index e8a2be6719260d..ca0cc313cc5994 100644 --- a/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery.tsx +++ b/static/app/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery.tsx @@ -11,8 +11,8 @@ import type {BrowserType} from 'sentry/views/insights/browser/webVitals/utils/qu import {useWebVitalsSort} from 'sentry/views/insights/browser/webVitals/utils/useWebVitalsSort'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; import { - type EAPSpanProperty, SpanFields, + type SpanProperty, type SubregionCode, } from 'sentry/views/insights/types'; @@ -44,7 +44,7 @@ export const useTransactionWebVitalsScoresQuery = ({ const sort = useWebVitalsSort({sortName, defaultSort}); const totalOpportunityScoreField = - 'opportunity_score(measurements.score.total)' satisfies EAPSpanProperty; + 'opportunity_score(measurements.score.total)' satisfies SpanProperty; if (sort !== undefined) { if (sort.field === 'avg(measurements.score.total)') { diff --git a/static/app/views/insights/browser/webVitals/settings.ts b/static/app/views/insights/browser/webVitals/settings.ts index 53df4021da822a..b1d2d558f283a0 100644 --- a/static/app/views/insights/browser/webVitals/settings.ts +++ b/static/app/views/insights/browser/webVitals/settings.ts @@ -1,5 +1,5 @@ import {t} from 'sentry/locale'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; export const MODULE_TITLE = t('Web Vitals'); export const BASE_URL = 'pageloads'; @@ -20,4 +20,4 @@ export const FIELD_ALIASES = { 'p75(measurements.inp)': 'INP', 'p75(measurements.cls)': 'CLS', 'p75(measurements.ttfb)': 'TTFB', -} satisfies Partial>; +} satisfies Partial>; diff --git a/static/app/views/insights/cache/components/samplePanel.tsx b/static/app/views/insights/cache/components/samplePanel.tsx index 097b12b2acfd77..dc911a1a40be61 100644 --- a/static/app/views/insights/cache/components/samplePanel.tsx +++ b/static/app/views/insights/cache/components/samplePanel.tsx @@ -35,7 +35,7 @@ import { getThroughputTitle, } from 'sentry/views/insights/common/views/spans/types'; import {InsightsSpanTagProvider} from 'sentry/views/insights/pages/insightsSpanTagProvider'; -import type {EAPSpanResponse, SpanQueryFilters} from 'sentry/views/insights/types'; +import type {SpanQueryFilters, SpanResponse} from 'sentry/views/insights/types'; import {ModuleName, SpanFields, SpanFunction} from 'sentry/views/insights/types'; // This is similar to http sample table, its difficult to use the generic span samples sidebar as we require a bunch of custom things. @@ -115,10 +115,7 @@ export function CacheSamplePanel() { ['project.id']: query.project, }; - const useIndexedCacheSpans = ( - isCacheHit: EAPSpanResponse['cache.hit'], - limit: number - ) => + const useIndexedCacheSpans = (isCacheHit: SpanResponse['cache.hit'], limit: number) => useSpans( { search: MutableSearch.fromQueryObject({ diff --git a/static/app/views/insights/cache/components/tables/spanSamplesTable.tsx b/static/app/views/insights/cache/components/tables/spanSamplesTable.tsx index aefa2a924c8f4e..051adf557fbcc6 100644 --- a/static/app/views/insights/cache/components/tables/spanSamplesTable.tsx +++ b/static/app/views/insights/cache/components/tables/spanSamplesTable.tsx @@ -16,7 +16,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import {CacheHitMissCell} from 'sentry/views/insights/cache/components/tables/cacheHitMissCell'; import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells/renderHeadCell'; import {SpanIdCell} from 'sentry/views/insights/common/components/tableCells/spanIdCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {ModuleName, SpanFields} from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; @@ -36,7 +36,7 @@ type ColumnKeys = | SpanFields.CACHE_ITEM_SIZE | 'transaction.duration'; -type DataRow = Pick & { +type DataRow = Pick & { 'cache.hit': '' | 'true' | 'false'; 'transaction.duration': number; // TODO: this should be a boolean }; diff --git a/static/app/views/insights/cache/components/tables/transactionsTable.tsx b/static/app/views/insights/cache/components/tables/transactionsTable.tsx index 2ca4a2c1e45172..6c1fd88c06650f 100644 --- a/static/app/views/insights/cache/components/tables/transactionsTable.tsx +++ b/static/app/views/insights/cache/components/tables/transactionsTable.tsx @@ -22,17 +22,17 @@ import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import { - type EAPSpanResponse, ModuleName, SpanFields, SpanFunction, + type SpanResponse, } from 'sentry/views/insights/types'; const {CACHE_MISS_RATE, EPM} = SpanFunction; const {CACHE_ITEM_SIZE} = SpanFields; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'project' | 'project.id' | 'transaction' @@ -41,7 +41,7 @@ type Row = Pick< | 'sum(span.self_time)' | 'avg(cache.item_size)' > & - Pick; + Pick; type Column = GridColumnHeader< | 'transaction' diff --git a/static/app/views/insights/common/components/spanDescription.tsx b/static/app/views/insights/common/components/spanDescription.tsx index 6e3c5df0b55f6e..99d394b36df25a 100644 --- a/static/app/views/insights/common/components/spanDescription.tsx +++ b/static/app/views/insights/common/components/spanDescription.tsx @@ -22,12 +22,12 @@ import { isValidJson, prettyPrintJsonString, } from 'sentry/views/insights/database/utils/jsonUtils'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; interface Props { - groupId: EAPSpanResponse[SpanFields.SPAN_GROUP]; - op: EAPSpanResponse[SpanFields.SPAN_OP]; + groupId: SpanResponse[SpanFields.SPAN_GROUP]; + op: SpanResponse[SpanFields.SPAN_OP]; preliminaryDescription?: string; } diff --git a/static/app/views/insights/common/components/tableCells/starredSegmentCell.tsx b/static/app/views/insights/common/components/tableCells/starredSegmentCell.tsx index 27dcb56b070f3f..eae2ae703210b1 100644 --- a/static/app/views/insights/common/components/tableCells/starredSegmentCell.tsx +++ b/static/app/views/insights/common/components/tableCells/starredSegmentCell.tsx @@ -7,7 +7,7 @@ import {useQueryClient} from 'sentry/utils/queryClient'; import type {Flatten} from 'sentry/utils/types/flatten'; import useProjects from 'sentry/utils/useProjects'; import {useStarredSegment} from 'sentry/views/insights/common/utils/useStarredSegment'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; interface Props { isStarred: boolean; @@ -16,8 +16,7 @@ interface Props { } type TableRow = Flatten< - Partial & - Pick + Partial & Pick >; type TableResponse = [{confidence: any; data: TableRow[]; meta: EventsMetaType}]; diff --git a/static/app/views/insights/common/queries/useDiscover.spec.tsx b/static/app/views/insights/common/queries/useDiscover.spec.tsx index 9f9207447ee23d..e4f5e5d26da184 100644 --- a/static/app/views/insights/common/queries/useDiscover.spec.tsx +++ b/static/app/views/insights/common/queries/useDiscover.spec.tsx @@ -12,7 +12,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import usePageFilters from 'sentry/utils/usePageFilters'; import {SAMPLING_MODE} from 'sentry/views/explore/hooks/useProgressiveQuery'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; import {OrganizationContext} from 'sentry/views/organizationContext'; @@ -51,7 +51,7 @@ describe('useDiscover', () => { { wrapper: Wrapper, initialProps: { - fields: ['epm()'] as EAPSpanProperty[], + fields: ['epm()'] as SpanProperty[], enabled: false, }, } @@ -97,7 +97,7 @@ describe('useDiscover', () => { release: '0.0.1', environment: undefined, }, - fields: ['epm()'] as EAPSpanProperty[], + fields: ['epm()'] as SpanProperty[], sorts: [{field: 'epm()', kind: 'desc' as const}], limit: 10, referrer: 'api-spec', @@ -178,7 +178,7 @@ describe('useDiscover', () => { { wrapper: Wrapper, initialProps: { - fields: [SpanFields.SPAN_DESCRIPTION] as EAPSpanProperty[], + fields: [SpanFields.SPAN_DESCRIPTION] as SpanProperty[], enabled: false, }, } @@ -235,7 +235,7 @@ describe('useDiscover', () => { SpanFields.SPAN_OP, SpanFields.SPAN_GROUP, SpanFields.SPAN_DESCRIPTION, - ] as EAPSpanProperty[], + ] as SpanProperty[], sorts: [{field: 'span.group', kind: 'desc' as const}], limit: 10, referrer: 'api-spec', diff --git a/static/app/views/insights/common/queries/useDiscoverSeries.spec.tsx b/static/app/views/insights/common/queries/useDiscoverSeries.spec.tsx index 5806dd511991ad..2ea188bd7b123f 100644 --- a/static/app/views/insights/common/queries/useDiscoverSeries.spec.tsx +++ b/static/app/views/insights/common/queries/useDiscoverSeries.spec.tsx @@ -11,7 +11,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import usePageFilters from 'sentry/utils/usePageFilters'; import {SAMPLING_MODE} from 'sentry/views/explore/hooks/useProgressiveQuery'; import {useSpanSeries} from 'sentry/views/insights/common/queries/useDiscoverSeries'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {OrganizationContext} from 'sentry/views/organizationContext'; jest.mock('sentry/utils/useLocation'); @@ -114,7 +114,7 @@ describe('useSpanSeries', () => { 'resource.render_blocking_status': 'blocking' as const, environment: undefined, }, - yAxis: ['epm()'] as EAPSpanProperty[], + yAxis: ['epm()'] as SpanProperty[], }, } ); @@ -152,7 +152,7 @@ describe('useSpanSeries', () => { { wrapper: Wrapper, initialProps: { - yAxis: ['avg(span.self_time)', 'epm()'] as EAPSpanProperty[], + yAxis: ['avg(span.self_time)', 'epm()'] as SpanProperty[], }, } ); @@ -163,13 +163,13 @@ describe('useSpanSeries', () => { method: 'GET', query: expect.objectContaining({ interval: '30m', - yAxis: ['avg(span.self_time)', 'epm()'] as EAPSpanProperty[], + yAxis: ['avg(span.self_time)', 'epm()'] as SpanProperty[], }), }) ); rerender({ - yAxis: ['p95(span.self_time)', 'epm()'] as EAPSpanProperty[], + yAxis: ['p95(span.self_time)', 'epm()'] as SpanProperty[], }); await waitFor(() => @@ -179,7 +179,7 @@ describe('useSpanSeries', () => { method: 'GET', query: expect.objectContaining({ interval: '1h', - yAxis: ['p95(span.self_time)', 'epm()'] as EAPSpanProperty[], + yAxis: ['p95(span.self_time)', 'epm()'] as SpanProperty[], }), }) ) @@ -211,7 +211,7 @@ describe('useSpanSeries', () => { { wrapper: Wrapper, initialProps: { - yAxis: ['epm()'] as EAPSpanProperty[], + yAxis: ['epm()'] as SpanProperty[], }, } ); @@ -278,7 +278,7 @@ describe('useSpanSeries', () => { { wrapper: Wrapper, initialProps: { - yAxis: ['http_response_rate(3)', 'http_response_rate(4)'] as EAPSpanProperty[], + yAxis: ['http_response_rate(3)', 'http_response_rate(4)'] as SpanProperty[], }, } ); @@ -331,7 +331,7 @@ describe('useSpanSeries', () => { { wrapper: Wrapper, initialProps: { - yAxis: ['http_response_rate(3)', 'http_response_rate(4)'] as EAPSpanProperty[], + yAxis: ['http_response_rate(3)', 'http_response_rate(4)'] as SpanProperty[], }, } ); diff --git a/static/app/views/insights/common/queries/useDiscoverSeries.ts b/static/app/views/insights/common/queries/useDiscoverSeries.ts index 8aaf7f91b6fcd7..a0776c00856697 100644 --- a/static/app/views/insights/common/queries/useDiscoverSeries.ts +++ b/static/app/views/insights/common/queries/useDiscoverSeries.ts @@ -17,11 +17,7 @@ import { getRetryDelay, shouldRetryHandler, } from 'sentry/views/insights/common/utils/retryHandlers'; -import type { - EAPSpanProperty, - SpanFields, - SpanFunctions, -} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {convertDiscoverTimeseriesResponse} from './convertDiscoverTimeseriesResponse'; @@ -41,9 +37,7 @@ interface UseMetricsSeriesOptions { yAxis?: Fields; } -export const useSpanSeries = < - Fields extends EAPSpanProperty[] | SpanFields[] | SpanFunctions[] | string[], ->( +export const useSpanSeries = ( options: UseMetricsSeriesOptions = {}, referrer: string, pageFilters?: PageFilters diff --git a/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts b/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts index 4176369f5fbbd1..5d98c3170a58ed 100644 --- a/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts +++ b/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts @@ -18,7 +18,7 @@ import { getRetryDelay, shouldRetryHandler, } from 'sentry/views/insights/common/utils/retryHandlers'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {convertDiscoverTimeseriesResponse} from './convertDiscoverTimeseriesResponse'; @@ -37,8 +37,8 @@ interface UseMetricsSeriesOptions { } export const useTopNSpanMultiSeries = < - YAxisFields extends EAPSpanProperty[], - Fields extends EAPSpanProperty[], + YAxisFields extends SpanProperty[], + Fields extends SpanProperty[], >( options: UseMetricsSeriesOptions, referrer: string, diff --git a/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts b/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts index 66e6b2166f4030..959ce88670c0ca 100644 --- a/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts +++ b/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts @@ -19,11 +19,7 @@ import { getRetryDelay, shouldRetryHandler, } from 'sentry/views/insights/common/utils/retryHandlers'; -import type { - EAPSpanProperty, - SpanFields, - SpanFunctions, -} from 'sentry/views/insights/types'; +import type {SpanFields, SpanFunctions, SpanProperty} from 'sentry/views/insights/types'; import {convertDiscoverTimeseriesResponse} from './convertDiscoverTimeseriesResponse'; @@ -44,8 +40,8 @@ interface UseMetricsSeriesOptions { export const useTopNSpanSeries = < Fields extends - | EAPSpanProperty[] - | EAPSpanProperty[] + | SpanProperty[] + | SpanProperty[] | SpanFields[] | SpanFunctions[] | string[], diff --git a/static/app/views/insights/database/components/tables/queriesTable.tsx b/static/app/views/insights/database/components/tables/queriesTable.tsx index a38644dfa2e896..aeaa28183b9bbe 100644 --- a/static/app/views/insights/database/components/tables/queriesTable.tsx +++ b/static/app/views/insights/database/components/tables/queriesTable.tsx @@ -20,11 +20,11 @@ import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells import {SpanDescriptionCell} from 'sentry/views/insights/common/components/tableCells/spanDescriptionCell'; import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {ModuleName} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'project.id' | 'sentry.normalized_description' | 'span.group' diff --git a/static/app/views/insights/database/components/tables/queryTransactionsTable.tsx b/static/app/views/insights/database/components/tables/queryTransactionsTable.tsx index 0ce265a48890d4..2342e00aae1573 100644 --- a/static/app/views/insights/database/components/tables/queryTransactionsTable.tsx +++ b/static/app/views/insights/database/components/tables/queryTransactionsTable.tsx @@ -24,11 +24,11 @@ import { DataTitles, getThroughputTitle, } from 'sentry/views/insights/common/views/spans/types'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'transaction' | 'transaction.method' | 'epm()' @@ -71,7 +71,7 @@ interface Props { data: Row[]; isLoading: boolean; sort: ValidSort; - span: Pick; + span: Pick; error?: Error | null; meta?: EventsMetaType; pageLinks?: string; @@ -145,7 +145,7 @@ function renderBodyCell( column: Column, row: Row, meta: EventsMetaType | undefined, - span: Pick, + span: Pick, location: Location, organization: Organization, theme: Theme diff --git a/static/app/views/insights/database/settings.ts b/static/app/views/insights/database/settings.ts index 8a6a5327e3ace2..1cea3b0d19538a 100644 --- a/static/app/views/insights/database/settings.ts +++ b/static/app/views/insights/database/settings.ts @@ -9,11 +9,7 @@ import { TWO_WEEKS, } from 'sentry/components/charts/utils'; import {t} from 'sentry/locale'; -import { - type Aggregate, - type EAPSpanProperty, - ModuleName, -} from 'sentry/views/insights/types'; +import {type Aggregate, ModuleName, type SpanProperty} from 'sentry/views/insights/types'; export const MODULE_TITLE = t('Queries'); export const DATA_TYPE = t('Query'); @@ -69,4 +65,4 @@ export const MODULE_FEATURES = ['insights-initial-modules']; export const FIELD_ALIASES = { 'epm()': t('Queries Per Minute'), -} satisfies Partial>; +} satisfies Partial>; diff --git a/static/app/views/insights/http/components/tables/domainTransactionsTable.tsx b/static/app/views/insights/http/components/tables/domainTransactionsTable.tsx index b49933a0acfd33..51575ade5a988c 100644 --- a/static/app/views/insights/http/components/tables/domainTransactionsTable.tsx +++ b/static/app/views/insights/http/components/tables/domainTransactionsTable.tsx @@ -20,10 +20,10 @@ import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import {TransactionCell} from 'sentry/views/insights/http/components/tables/transactionCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'project.id' | 'transaction' | 'transaction.method' diff --git a/static/app/views/insights/http/components/tables/domainsTable.tsx b/static/app/views/insights/http/components/tables/domainsTable.tsx index a3d3cbd50d7d88..73fa1de09db475 100644 --- a/static/app/views/insights/http/components/tables/domainsTable.tsx +++ b/static/app/views/insights/http/components/tables/domainsTable.tsx @@ -20,10 +20,10 @@ import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import {DomainCell} from 'sentry/views/insights/http/components/tables/domainCell'; -import {type EAPSpanResponse, ModuleName} from 'sentry/views/insights/types'; +import {ModuleName, type SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'project' | 'project.id' | 'span.domain' diff --git a/static/app/views/insights/http/components/tables/spanSamplesTable.tsx b/static/app/views/insights/http/components/tables/spanSamplesTable.tsx index 6574b84288f4fe..6d20e0d56b5ded 100644 --- a/static/app/views/insights/http/components/tables/spanSamplesTable.tsx +++ b/static/app/views/insights/http/components/tables/spanSamplesTable.tsx @@ -15,7 +15,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import useOrganization from 'sentry/utils/useOrganization'; import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells/renderHeadCell'; import {SpanIdCell} from 'sentry/views/insights/common/components/tableCells/spanIdCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {ModuleName, SpanFields} from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; @@ -33,7 +33,7 @@ type ColumnKeys = | SpanFields.SPAN_DESCRIPTION | SpanFields.SPAN_STATUS_CODE; -type DataRow = Pick; +type DataRow = Pick; type Column = GridColumnHeader; diff --git a/static/app/views/insights/http/queries/useSpanSamples.tsx b/static/app/views/insights/http/queries/useSpanSamples.tsx index 93739501e6fd92..ff4fa9e057eae2 100644 --- a/static/app/views/insights/http/queries/useSpanSamples.tsx +++ b/static/app/views/insights/http/queries/useSpanSamples.tsx @@ -13,7 +13,7 @@ import type { NonDefaultSpanSampleFields, } from 'sentry/views/insights/common/queries/useSpanSamples'; import {getDateConditions} from 'sentry/views/insights/common/utils/getDateConditions'; -import {type EAPSpanResponse, SpanFields} from 'sentry/views/insights/types'; +import {SpanFields, type SpanResponse} from 'sentry/views/insights/types'; interface UseSpanSamplesOptions { enabled?: boolean; @@ -50,7 +50,7 @@ export const useSpanSamples = ( const dateConditions = getDateConditions(selection); return useApiQuery<{ - data: Array>; + data: Array>; meta: EventsMetaType; }>( [ diff --git a/static/app/views/insights/llmMonitoring/components/tables/pipelinesTable.tsx b/static/app/views/insights/llmMonitoring/components/tables/pipelinesTable.tsx index 5cf4b630ff7edf..8442383ebd613d 100644 --- a/static/app/views/insights/llmMonitoring/components/tables/pipelinesTable.tsx +++ b/static/app/views/insights/llmMonitoring/components/tables/pipelinesTable.tsx @@ -31,10 +31,10 @@ import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; import {combineMeta} from 'sentry/views/insights/common/utils/combineMeta'; import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL'; import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'project.id' | 'span.description' | 'span.group' diff --git a/static/app/views/insights/mobile/appStarts/components/startDurationWidget.tsx b/static/app/views/insights/mobile/appStarts/components/startDurationWidget.tsx index d336bdf1fef67a..6ac3c77b5ca08a 100644 --- a/static/app/views/insights/mobile/appStarts/components/startDurationWidget.tsx +++ b/static/app/views/insights/mobile/appStarts/components/startDurationWidget.tsx @@ -18,7 +18,7 @@ import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseCo import {COLD_START_TYPE} from 'sentry/views/insights/mobile/appStarts/components/startTypeSelector'; import {Referrer} from 'sentry/views/insights/mobile/appStarts/referrers'; import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; const COLD_START_CONDITIONS = [ @@ -85,7 +85,7 @@ function StartDurationWidget({additionalFilters}: Props) { const search = new MutableSearch(queryString); const referrer = Referrer.MOBILE_APP_STARTS_DURATION_CHART; const groupBy = SpanFields.RELEASE; - const yAxis: EAPSpanProperty = 'avg(span.duration)'; + const yAxis: SpanProperty = 'avg(span.duration)'; const { data, diff --git a/static/app/views/insights/mobile/screenload/components/charts/screenBarChart.tsx b/static/app/views/insights/mobile/screenload/components/charts/screenBarChart.tsx index b2b4aef2924229..c745fe7ea7547f 100644 --- a/static/app/views/insights/mobile/screenload/components/charts/screenBarChart.tsx +++ b/static/app/views/insights/mobile/screenload/components/charts/screenBarChart.tsx @@ -27,7 +27,7 @@ import {useReleaseSelection} from 'sentry/views/insights/common/queries/useRelea import {YAxis, YAXIS_COLUMNS} from 'sentry/views/insights/mobile/screenload/constants'; import {Referrer} from 'sentry/views/insights/mobile/screenload/referrers'; import {transformDeviceClassEvents} from 'sentry/views/insights/mobile/screenload/utils'; -import {type EAPSpanProperty, SpanFields} from 'sentry/views/insights/types'; +import {SpanFields, type SpanProperty} from 'sentry/views/insights/types'; export function ScreensBarChart({ chartHeight, @@ -47,7 +47,7 @@ export function ScreensBarChart({ secondaryRelease, } = useReleaseSelection(); - const breakdownMetric: EAPSpanProperty = + const breakdownMetric: SpanProperty = type === 'ttid' ? 'avg(measurements.time_to_initial_display)' : 'avg(measurements.time_to_full_display)'; diff --git a/static/app/views/insights/mobile/screenload/components/metricsRibbon.tsx b/static/app/views/insights/mobile/screenload/components/metricsRibbon.tsx index 650be3d8710d45..df07084ef0d5da 100644 --- a/static/app/views/insights/mobile/screenload/components/metricsRibbon.tsx +++ b/static/app/views/insights/mobile/screenload/components/metricsRibbon.tsx @@ -12,7 +12,7 @@ import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; import {useReleaseSelection} from 'sentry/views/insights/common/queries/useReleases'; import {appendReleaseFilters} from 'sentry/views/insights/common/utils/releaseComparison'; import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; type TableData = { data: Array>; @@ -34,7 +34,7 @@ export function MobileMetricsRibbon({ referrer, }: { blocks: BlockProps[]; - fields: EAPSpanProperty[]; + fields: SpanProperty[]; referrer: string; filters?: string[]; }) { diff --git a/static/app/views/insights/mobile/screenload/constants.ts b/static/app/views/insights/mobile/screenload/constants.ts index 8c05ac076f6f2d..850bacd6ef8210 100644 --- a/static/app/views/insights/mobile/screenload/constants.ts +++ b/static/app/views/insights/mobile/screenload/constants.ts @@ -1,5 +1,5 @@ import {t} from 'sentry/locale'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; export enum MobileCursors { SPANS_TABLE = 'spansCursor', @@ -27,7 +27,7 @@ export enum YAxis { FRAMES_DELAY = 10, } -export const YAXIS_COLUMNS: Readonly> = { +export const YAXIS_COLUMNS: Readonly> = { [YAxis.WARM_START]: 'avg(measurements.app_start_warm)', [YAxis.COLD_START]: 'avg(measurements.app_start_cold)', [YAxis.TTID]: 'avg(measurements.time_to_initial_display)', diff --git a/static/app/views/insights/mobile/screenload/utils.tsx b/static/app/views/insights/mobile/screenload/utils.tsx index 09c04c5c4128b8..a612ec0a022f74 100644 --- a/static/app/views/insights/mobile/screenload/utils.tsx +++ b/static/app/views/insights/mobile/screenload/utils.tsx @@ -5,7 +5,7 @@ import type {Project} from 'sentry/types/project'; import {defined} from 'sentry/utils'; import type {YAxis} from 'sentry/views/insights/mobile/screenload/constants'; import {YAXIS_COLUMNS} from 'sentry/views/insights/mobile/screenload/constants'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; export function isCrossPlatform(project: Project) { return project.platform && ['react-native', 'flutter'].includes(project.platform); @@ -20,7 +20,7 @@ export function transformDeviceClassEvents({ }: { theme: Theme; yAxes: YAxis[]; - data?: Array & Pick>; + data?: Array & Pick>; primaryRelease?: string; secondaryRelease?: string; }): Record> { diff --git a/static/app/views/insights/mobile/screens/components/screensOverview.tsx b/static/app/views/insights/mobile/screens/components/screensOverview.tsx index bf96795effde4c..4d839d8e962c7a 100644 --- a/static/app/views/insights/mobile/screens/components/screensOverview.tsx +++ b/static/app/views/insights/mobile/screens/components/screensOverview.tsx @@ -20,7 +20,7 @@ import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries import ScreensOverviewTable from 'sentry/views/insights/mobile/screens/components/screensOverviewTable'; import {Referrer} from 'sentry/views/insights/mobile/screens/referrers'; import {DEFAULT_SORT} from 'sentry/views/insights/mobile/screens/settings'; -import {type EAPSpanProperty, SpanFields} from 'sentry/views/insights/types'; +import {SpanFields, type SpanProperty} from 'sentry/views/insights/types'; import {getTransactionSearchQuery} from 'sentry/views/performance/utils'; const getQueryString = ( @@ -57,7 +57,7 @@ const transactionMetricsFields = [ 'avg(measurements.app_start_warm)', `avg(measurements.time_to_initial_display)`, `avg(measurements.time_to_full_display)`, -] as const satisfies EAPSpanProperty[]; +] as const satisfies SpanProperty[]; const spanMetricsFields = [ SpanFields.PROJECT_ID, @@ -65,7 +65,7 @@ const spanMetricsFields = [ `division(mobile.slow_frames,mobile.total_frames)`, `division(mobile.frozen_frames,mobile.total_frames)`, `avg(mobile.frames_delay)`, -] as const satisfies EAPSpanProperty[]; +] as const satisfies SpanProperty[]; export function ScreensOverview() { const navigate = useNavigate(); diff --git a/static/app/views/insights/mobile/screens/components/screensOverviewTable.tsx b/static/app/views/insights/mobile/screens/components/screensOverviewTable.tsx index f6de19083f8ffb..9478a5fa22b98f 100644 --- a/static/app/views/insights/mobile/screens/components/screensOverviewTable.tsx +++ b/static/app/views/insights/mobile/screens/components/screensOverviewTable.tsx @@ -12,11 +12,11 @@ import {useLocation} from 'sentry/utils/useLocation'; import {OverflowEllipsisTextContainer} from 'sentry/views/insights/common/components/textAlign'; import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL'; import {ScreensTable} from 'sentry/views/insights/mobile/common/components/tables/screensTable'; -import {type EAPSpanResponse, ModuleName} from 'sentry/views/insights/types'; +import {ModuleName, type SpanResponse} from 'sentry/views/insights/types'; export type Row = | Pick< - EAPSpanResponse, + SpanResponse, | 'project.id' | 'transaction' | 'division(mobile.slow_frames,mobile.total_frames)' @@ -24,7 +24,7 @@ export type Row = | 'avg(mobile.frames_delay)' > | Pick< - EAPSpanResponse, + SpanResponse, | 'project.id' | 'transaction' | 'count()' diff --git a/static/app/views/insights/mobile/screens/utils.ts b/static/app/views/insights/mobile/screens/utils.ts index e8a3ee9986e3da..9b3cdae8b9cbf5 100644 --- a/static/app/views/insights/mobile/screens/utils.ts +++ b/static/app/views/insights/mobile/screens/utils.ts @@ -2,7 +2,7 @@ import {DURATION_UNITS} from 'sentry/utils/discover/fieldRenderers'; import type {DiscoverDatasets} from 'sentry/utils/discover/types'; import getDuration from 'sentry/utils/duration/getDuration'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {VitalState} from 'sentry/views/performance/vitalDetail/utils'; const formatMetricValue = (metric: MetricValue, field?: string | undefined): string => { @@ -56,7 +56,7 @@ type GenericVitalItem< dataset: T; description: string; docs: React.ReactNode; - field: T extends DiscoverDatasets.SPANS_METRICS ? EAPSpanProperty : EAPSpanProperty; + field: T extends DiscoverDatasets.SPANS_METRICS ? SpanProperty : SpanProperty; getStatus: (value: MetricValue, field?: string | undefined) => VitalStatus; platformDocLinks: Record; sdkDocLinks: Record; diff --git a/static/app/views/insights/pages/backend/backendOverviewPage.tsx b/static/app/views/insights/pages/backend/backendOverviewPage.tsx index 1fc1058c0a7f77..d0c31c13f234f9 100644 --- a/static/app/views/insights/pages/backend/backendOverviewPage.tsx +++ b/static/app/views/insights/pages/backend/backendOverviewPage.tsx @@ -55,7 +55,7 @@ import {IssuesWidget} from 'sentry/views/insights/pages/platform/shared/issuesWi import {TransactionNameSearchBar} from 'sentry/views/insights/pages/transactionNameSearchBar'; import {useOverviewPageTrackPageload} from 'sentry/views/insights/pages/useOverviewPageTrackAnalytics'; import {categorizeProjects} from 'sentry/views/insights/pages/utils'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {LegacyOnboarding} from 'sentry/views/performance/onboarding'; function BackendOverviewPage() { @@ -152,7 +152,7 @@ function EAPBackendOverviewPage() { const sorts: [ValidSort, ValidSort] = [ { - field: 'is_starred_transaction' satisfies EAPSpanProperty, + field: 'is_starred_transaction' satisfies SpanProperty, kind: 'desc', }, decodeSorts(location.query?.sort).find(isAValidSort) ?? DEFAULT_SORT, diff --git a/static/app/views/insights/pages/backend/backendTable.tsx b/static/app/views/insights/pages/backend/backendTable.tsx index 6c967634ad823f..ddd00cbfd16f1c 100644 --- a/static/app/views/insights/pages/backend/backendTable.tsx +++ b/static/app/views/insights/pages/backend/backendTable.tsx @@ -23,10 +23,10 @@ import {StarredSegmentCell} from 'sentry/views/insights/common/components/tableC import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import {TransactionCell} from 'sentry/views/insights/pages/transactionCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'is_starred_transaction' | 'request.method' | 'transaction' diff --git a/static/app/views/insights/pages/backend/settings.ts b/static/app/views/insights/pages/backend/settings.ts index b7cddbe75402f0..dc8867be384a80 100644 --- a/static/app/views/insights/pages/backend/settings.ts +++ b/static/app/views/insights/pages/backend/settings.ts @@ -2,7 +2,7 @@ import {backend} from 'sentry/data/platformCategories'; import {t} from 'sentry/locale'; import type {PlatformKey} from 'sentry/types/project'; import type {ValidSort} from 'sentry/views/insights/pages/backend/backendTable'; -import {type EAPSpanProperty, ModuleName} from 'sentry/views/insights/types'; +import {ModuleName, type SpanProperty} from 'sentry/views/insights/types'; export const BACKEND_LANDING_SUB_PATH = 'backend'; export const BACKEND_LANDING_TITLE = t('Backend'); @@ -18,7 +18,7 @@ export const MODULES = [ export const OVERVIEW_PAGE_ALLOWED_OPS = ['http.server']; export const DEFAULT_SORT: ValidSort = { - field: 'sum(span.duration)' satisfies EAPSpanProperty, + field: 'sum(span.duration)' satisfies SpanProperty, kind: 'desc', }; diff --git a/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx b/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx index b3ee1994f8e030..58b88fd5d8d5f9 100644 --- a/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx +++ b/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx @@ -58,7 +58,7 @@ import {useIsNextJsInsightsAvailable} from 'sentry/views/insights/pages/platform import {TransactionNameSearchBar} from 'sentry/views/insights/pages/transactionNameSearchBar'; import {useOverviewPageTrackPageload} from 'sentry/views/insights/pages/useOverviewPageTrackAnalytics'; import {categorizeProjects} from 'sentry/views/insights/pages/utils'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {generateFrontendOtherPerformanceEventView} from 'sentry/views/performance/data'; import { DoubleChartRow, @@ -204,7 +204,7 @@ function EAPOverviewPage() { const sorts: [ValidSort, ValidSort] = [ { - field: 'is_starred_transaction' satisfies EAPSpanProperty, + field: 'is_starred_transaction' satisfies SpanProperty, kind: 'desc', }, decodeSorts(location.query?.sort).find(isAValidSort) ?? DEFAULT_SORT, diff --git a/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx b/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx index d3e71d60159e5e..d90dfa5b47bb18 100644 --- a/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx +++ b/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx @@ -23,10 +23,10 @@ import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import {StyledIconStar} from 'sentry/views/insights/pages/backend/backendTable'; import {SPAN_OP_QUERY_PARAM} from 'sentry/views/insights/pages/frontend/settings'; import {TransactionCell} from 'sentry/views/insights/pages/transactionCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'is_starred_transaction' | 'transaction' | 'project' diff --git a/static/app/views/insights/pages/frontend/settings.ts b/static/app/views/insights/pages/frontend/settings.ts index 6a526cf00a8e8c..cd73ba0cf3b61d 100644 --- a/static/app/views/insights/pages/frontend/settings.ts +++ b/static/app/views/insights/pages/frontend/settings.ts @@ -2,7 +2,7 @@ import {frontend} from 'sentry/data/platformCategories'; import {t} from 'sentry/locale'; import type {PlatformKey} from 'sentry/types/project'; import type {ValidSort} from 'sentry/views/insights/pages/frontend/frontendOverviewTable'; -import {type EAPSpanProperty, ModuleName} from 'sentry/views/insights/types'; +import {ModuleName, type SpanProperty} from 'sentry/views/insights/types'; export const FRONTEND_LANDING_SUB_PATH = 'frontend'; export const FRONTEND_LANDING_TITLE = t('Frontend'); @@ -42,7 +42,7 @@ export const FRONTEND_PLATFORMS: PlatformKey[] = frontend.filter( ); export const DEFAULT_SORT: ValidSort = { - field: 'sum_if(span.duration,is_transaction,true)' satisfies EAPSpanProperty, + field: 'sum_if(span.duration,is_transaction,true)' satisfies SpanProperty, kind: 'desc', }; diff --git a/static/app/views/insights/pages/mobile/mobileOverviewPage.tsx b/static/app/views/insights/pages/mobile/mobileOverviewPage.tsx index 9f3758268470a8..41c62bf562f6fa 100644 --- a/static/app/views/insights/pages/mobile/mobileOverviewPage.tsx +++ b/static/app/views/insights/pages/mobile/mobileOverviewPage.tsx @@ -46,7 +46,7 @@ import { import {TransactionNameSearchBar} from 'sentry/views/insights/pages/transactionNameSearchBar'; import {useOverviewPageTrackPageload} from 'sentry/views/insights/pages/useOverviewPageTrackAnalytics'; import {categorizeProjects} from 'sentry/views/insights/pages/utils'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import { generateGenericPerformanceEventView, generateMobilePerformanceEventView, @@ -182,7 +182,7 @@ function EAPMobileOverviewPage() { const sorts: [ValidSort, ValidSort] = [ { - field: 'is_starred_transaction' satisfies EAPSpanProperty, + field: 'is_starred_transaction' satisfies SpanProperty, kind: 'desc', }, decodeSorts(location.query?.sort).find(isAValidSort) ?? DEFAULT_SORT, diff --git a/static/app/views/insights/pages/mobile/mobileOverviewTable.tsx b/static/app/views/insights/pages/mobile/mobileOverviewTable.tsx index 840c8baa87fe72..7689d73ddba907 100644 --- a/static/app/views/insights/pages/mobile/mobileOverviewTable.tsx +++ b/static/app/views/insights/pages/mobile/mobileOverviewTable.tsx @@ -21,10 +21,10 @@ import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParam import {DataTitles} from 'sentry/views/insights/common/views/spans/types'; import {StyledIconStar} from 'sentry/views/insights/pages/backend/backendTable'; import {TransactionCell} from 'sentry/views/insights/pages/transactionCell'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'is_starred_transaction' | 'transaction' | 'span.op' diff --git a/static/app/views/insights/pages/mobile/settings.ts b/static/app/views/insights/pages/mobile/settings.ts index 654391872bc645..d730289ddef851 100644 --- a/static/app/views/insights/pages/mobile/settings.ts +++ b/static/app/views/insights/pages/mobile/settings.ts @@ -2,7 +2,7 @@ import {mobile} from 'sentry/data/platformCategories'; import {t} from 'sentry/locale'; import type {PlatformKey} from 'sentry/types/project'; import type {ValidSort} from 'sentry/views/insights/pages/mobile/mobileOverviewTable'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {ModuleName} from 'sentry/views/insights/types'; export const MOBILE_LANDING_SUB_PATH = 'mobile'; @@ -24,6 +24,6 @@ export const MODULES = [ModuleName.MOBILE_VITALS, ModuleName.HTTP, ModuleName.SE export const MOBILE_PLATFORMS: PlatformKey[] = [...mobile]; export const DEFAULT_SORT: ValidSort = { - field: 'sum(span.duration)' satisfies EAPSpanProperty, + field: 'sum(span.duration)' satisfies SpanProperty, kind: 'desc', }; diff --git a/static/app/views/insights/pages/platform/nextjs/webVitalsWidget.tsx b/static/app/views/insights/pages/platform/nextjs/webVitalsWidget.tsx index babaabd99ef339..f7fdc1b9be4d30 100644 --- a/static/app/views/insights/pages/platform/nextjs/webVitalsWidget.tsx +++ b/static/app/views/insights/pages/platform/nextjs/webVitalsWidget.tsx @@ -19,9 +19,9 @@ import {getPreviousPeriod} from 'sentry/views/insights/pages/platform/nextjs/uti import {ModalChartContainer} from 'sentry/views/insights/pages/platform/shared/styles'; import {Toolbar} from 'sentry/views/insights/pages/platform/shared/toolbar'; import {useTransactionNameQuery} from 'sentry/views/insights/pages/platform/shared/useTransactionNameQuery'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; -const FIELDS: EAPSpanProperty[] = [ +const FIELDS: SpanProperty[] = [ 'avg(measurements.score.total)', 'performance_score(measurements.score.lcp)', 'performance_score(measurements.score.fcp)', diff --git a/static/app/views/insights/pages/platform/shared/table/useTableData.tsx b/static/app/views/insights/pages/platform/shared/table/useTableData.tsx index 40c373efe77643..1e42aee116c459 100644 --- a/static/app/views/insights/pages/platform/shared/table/useTableData.tsx +++ b/static/app/views/insights/pages/platform/shared/table/useTableData.tsx @@ -3,11 +3,11 @@ import {useMemo} from 'react'; import {useLocation} from 'sentry/utils/useLocation'; import {useTableSortParams} from 'sentry/views/insights/agentMonitoring/components/headSortCell'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; -import type {EAPSpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; const PER_PAGE = 10; -export function useSpanTableData({ +export function useSpanTableData({ fields, referrer, query, @@ -39,7 +39,7 @@ export function useSpanTableData({ ); } -export function useTableDataWithController({ +export function useTableDataWithController({ fields, referrer, cursorParamName, diff --git a/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx b/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx index b9ad8ddbde4f3b..37e3be15755eee 100644 --- a/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx +++ b/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx @@ -46,7 +46,7 @@ import { } from 'sentry/views/insights/queues/settings'; import decodeRetryCount from 'sentry/views/insights/queues/utils/queryParameterDecoders/retryCount'; import decodeTraceStatus from 'sentry/views/insights/queues/utils/queryParameterDecoders/traceStatus'; -import {type EAPSpanResponse, ModuleName, SpanFields} from 'sentry/views/insights/types'; +import {ModuleName, SpanFields, type SpanResponse} from 'sentry/views/insights/types'; export function MessageSpanSamplesPanel() { const navigate = useNavigate(); @@ -376,7 +376,7 @@ function ProducerMetricsRibbon({ isLoading, }: { isLoading: boolean; - metrics: Array>; + metrics: Array>; }) { const errorRate = 1 - (metrics[0]?.['trace_status_rate(ok)'] ?? 0); return ( @@ -402,7 +402,7 @@ function ConsumerMetricsRibbon({ isLoading, }: { isLoading: boolean; - metrics: Array>; + metrics: Array>; }) { const errorRate = 1 - (metrics[0]?.['trace_status_rate(ok)'] ?? 0); return ( diff --git a/static/app/views/insights/queues/components/tables/messageSpanSamplesTable.tsx b/static/app/views/insights/queues/components/tables/messageSpanSamplesTable.tsx index 3bb6eccd8075b1..e53e0e038c7c4d 100644 --- a/static/app/views/insights/queues/components/tables/messageSpanSamplesTable.tsx +++ b/static/app/views/insights/queues/components/tables/messageSpanSamplesTable.tsx @@ -16,7 +16,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells/renderHeadCell'; import {SpanIdCell} from 'sentry/views/insights/common/components/tableCells/spanIdCell'; import {MessageActorType} from 'sentry/views/insights/queues/settings'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {ModuleName, SpanFields} from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; @@ -42,7 +42,7 @@ type ColumnKeys = | SpanFields.TRACE_STATUS | SpanFields.SPAN_DURATION; -type DataRow = Pick; +type DataRow = Pick; type Column = GridColumnHeader; diff --git a/static/app/views/insights/queues/components/tables/queuesTable.tsx b/static/app/views/insights/queues/components/tables/queuesTable.tsx index 90eab2a54e8f01..6572aeaf4247ef 100644 --- a/static/app/views/insights/queues/components/tables/queuesTable.tsx +++ b/static/app/views/insights/queues/components/tables/queuesTable.tsx @@ -27,10 +27,10 @@ import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL'; import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {useQueuesByDestinationQuery} from 'sentry/views/insights/queues/queries/useQueuesByDestinationQuery'; import {Referrer} from 'sentry/views/insights/queues/referrers'; -import {type EAPSpanResponse, ModuleName, SpanFields} from 'sentry/views/insights/types'; +import {ModuleName, SpanFields, type SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'sum(span.duration)' | 'messaging.destination.name' | 'avg(messaging.message.receive.latency)' diff --git a/static/app/views/insights/queues/components/tables/transactionsTable.tsx b/static/app/views/insights/queues/components/tables/transactionsTable.tsx index d5bf29dfa04c10..654d04ba8b95a8 100644 --- a/static/app/views/insights/queues/components/tables/transactionsTable.tsx +++ b/static/app/views/insights/queues/components/tables/transactionsTable.tsx @@ -26,10 +26,10 @@ import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL'; import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import {useQueuesByTransactionQuery} from 'sentry/views/insights/queues/queries/useQueuesByTransactionQuery'; import {Referrer} from 'sentry/views/insights/queues/referrers'; -import {type EAPSpanResponse} from 'sentry/views/insights/types'; +import {type SpanResponse} from 'sentry/views/insights/types'; type Row = Pick< - EAPSpanResponse, + SpanResponse, | 'sum(span.duration)' | 'transaction' | `avg_if(${string},${string},${string})` diff --git a/static/app/views/insights/settings.ts b/static/app/views/insights/settings.ts index 4feccb4a152f46..13e9575acf7d53 100644 --- a/static/app/views/insights/settings.ts +++ b/static/app/views/insights/settings.ts @@ -108,7 +108,7 @@ import { MODULE_VISIBLE_FEATURES as SESSIONS_MODULE_VISIBLE_FEATURES, } from 'sentry/views/insights/sessions/settings'; -import type {EAPSpanProperty} from './types'; +import type {SpanProperty} from './types'; import {ModuleName} from './types'; export const INSIGHTS_TITLE = t('Insights'); @@ -255,7 +255,7 @@ export const MODULES_CONSIDERED_NEW: Set = new Set([ export const INGESTION_DELAY = 90; // Base aliases used to map insights yAxis to human readable name -export const BASE_FIELD_ALIASES: Partial> = { +export const BASE_FIELD_ALIASES: Partial> = { 'avg(span.duration)': DataTitles.avg, 'avg(span.self_time)': DataTitles.avg, 'epm()': t('Requests Per Minute'), diff --git a/static/app/views/insights/types.tsx b/static/app/views/insights/types.tsx index c99c8f64cfda66..60681434ed026f 100644 --- a/static/app/views/insights/types.tsx +++ b/static/app/views/insights/types.tsx @@ -357,7 +357,7 @@ export type SpanFunctions = (typeof SPAN_FUNCTIONS)[number]; type WebVitalsFunctions = 'performance_score' | 'count_scores' | 'opportunity_score'; -type EAPSpanResponseRaw = { +type SpanResponseRaw = { [Property in SpanNumberFields as `${Aggregate}(${Property})`]: number; } & { [Property in SpanFunctions as `${Property}()`]: number; @@ -433,8 +433,8 @@ type EAPSpanResponseRaw = { [Property in SpanFields as `count_if(${Property},${string})`]: number; }; -export type EAPSpanResponse = Flatten; -export type EAPSpanProperty = keyof EAPSpanResponse; // TODO: rename this to `SpanProperty` when we remove `useInsightsEap` +export type SpanResponse = Flatten; +export type SpanProperty = keyof SpanResponse; export enum SpanFunction { SPS = 'sps', diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/index.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/index.tsx index 38257cf4ea7769..ff75d500f89173 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/index.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/index.tsx @@ -18,7 +18,7 @@ import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useLocation} from 'sentry/utils/useLocation'; import useProjects from 'sentry/utils/useProjects'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; -import type {EAPSpanResponse, SpanQueryFilters} from 'sentry/views/insights/types'; +import type {SpanQueryFilters, SpanResponse} from 'sentry/views/insights/types'; import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection'; import {Referrer} from 'sentry/views/performance/newTraceDetails/referrers'; import {traceAnalytics} from 'sentry/views/performance/newTraceDetails/traceAnalytics'; @@ -229,9 +229,7 @@ export function TransactionNodeDetails({ } type TransactionSpecificSectionsProps = { - cacheMetrics: Array< - Pick - >; + cacheMetrics: Array>; event: EventTransaction; node: TraceTreeNode; onParentClick: (node: TraceTreeNode) => void; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/builtIn.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/builtIn.tsx index 0c0236e64d973b..d23b62f137fde9 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/builtIn.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/builtIn.tsx @@ -3,7 +3,7 @@ import {t} from 'sentry/locale'; import type {EventTransaction} from 'sentry/types/event'; import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2'; import {formatPercentage} from 'sentry/utils/number/formatPercentage'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import { type SectionCardKeyValueList, TraceDrawerComponents, @@ -12,9 +12,7 @@ import { import {hasSDKContext} from './sdk'; type Props = { - cacheMetrics: Array< - Pick - >; + cacheMetrics: Array>; event: EventTransaction; }; diff --git a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/generalInfo.tsx b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/generalInfo.tsx index 9ba865db8ce530..87d8ad4156e8b3 100644 --- a/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/generalInfo.tsx +++ b/static/app/views/performance/newTraceDetails/traceDrawer/details/transaction/sections/generalInfo.tsx @@ -10,7 +10,7 @@ import {space} from 'sentry/styles/space'; import type {EventTransaction} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; import getDynamicText from 'sentry/utils/getDynamicText'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection'; import { type SectionCardKeyValueList, @@ -21,9 +21,7 @@ import type {TraceTreeNode} from 'sentry/views/performance/newTraceDetails/trace import {getTraceTabTitle} from 'sentry/views/performance/newTraceDetails/traceState/traceTabs'; type GeneralInfoProps = { - cacheMetrics: Array< - Pick - >; + cacheMetrics: Array>; event: EventTransaction; location: Location; node: TraceTreeNode; diff --git a/static/app/views/performance/otlp/types.tsx b/static/app/views/performance/otlp/types.tsx index a587cfb678b14a..4698c5676eee8a 100644 --- a/static/app/views/performance/otlp/types.tsx +++ b/static/app/views/performance/otlp/types.tsx @@ -3,11 +3,11 @@ import { type GridColumnHeader, } from 'sentry/components/tables/gridEditable'; import {t} from 'sentry/locale'; -import type {EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanResponse} from 'sentry/views/insights/types'; // TODO: When supported, also add span operation breakdown as a field export type ServiceEntrySpansRow = Pick< - EAPSpanResponse, + SpanResponse, | 'span_id' | 'user.display' | 'user.id' diff --git a/static/app/views/performance/otlp/useServiceEntrySpansQuery.tsx b/static/app/views/performance/otlp/useServiceEntrySpansQuery.tsx index 8a6f6578d7063c..5e5581ada162c9 100644 --- a/static/app/views/performance/otlp/useServiceEntrySpansQuery.tsx +++ b/static/app/views/performance/otlp/useServiceEntrySpansQuery.tsx @@ -4,7 +4,7 @@ import {MutableSearch} from 'sentry/utils/tokenizeSearch'; import {useLocation} from 'sentry/utils/useLocation'; import usePageFilters from 'sentry/utils/usePageFilters'; import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; -import {type EAPSpanProperty, SpanFields} from 'sentry/views/insights/types'; +import {SpanFields, type SpanProperty} from 'sentry/views/insights/types'; import {SERVICE_ENTRY_SPANS_CURSOR_NAME} from 'sentry/views/performance/transactionSummary/transactionOverview/content'; import {TransactionFilterOptions} from 'sentry/views/performance/transactionSummary/utils'; @@ -18,7 +18,7 @@ type Options = { const DEFAULT_LIMIT = 5; -const FIELDS: EAPSpanProperty[] = [ +const FIELDS: SpanProperty[] = [ 'span_id', 'user.id', 'user.email', diff --git a/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/content.tsx b/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/content.tsx index d51d3c6775754f..b0f21c755fb3b0 100644 --- a/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/content.tsx +++ b/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/content.tsx @@ -17,7 +17,7 @@ import {BackendHeader} from 'sentry/views/insights/pages/backend/backendPageHead import {FrontendHeader} from 'sentry/views/insights/pages/frontend/frontendPageHeader'; import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader'; import {useDomainViewFilters} from 'sentry/views/insights/pages/useFilters'; -import type {EAPSpanResponse, SpanQueryFilters} from 'sentry/views/insights/types'; +import type {SpanQueryFilters, SpanResponse} from 'sentry/views/insights/types'; import Breadcrumb, {getTabCrumbs} from 'sentry/views/performance/breadcrumb'; import {useOTelFriendlyUI} from 'sentry/views/performance/otlp/useOTelFriendlyUI'; import Tab from 'sentry/views/performance/transactionSummary/tabs'; @@ -183,7 +183,7 @@ function SpanSummaryContent(props: ContentProps) { ); } -function parseSpanHeaderData(data: Array>) { +function parseSpanHeaderData(data: Array>) { if (!data || data.length === 0) { return undefined; } diff --git a/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/spanSummaryTable.tsx b/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/spanSummaryTable.tsx index 66952dca0e51c4..54e5102061f45a 100644 --- a/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/spanSummaryTable.tsx +++ b/static/app/views/performance/transactionSummary/transactionSpans/spanSummary/spanSummaryTable.tsx @@ -34,10 +34,10 @@ import {SpanIdCell} from 'sentry/views/insights/common/components/tableCells/spa import {useSpans} from 'sentry/views/insights/common/queries/useDiscover'; import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters'; import { - type EAPSpanResponse, ModuleName, SpanFields, type SpanQueryFilters, + type SpanResponse, } from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; import Tab from 'sentry/views/performance/transactionSummary/tabs'; @@ -55,7 +55,7 @@ type DataRowKeys = type ColumnKeys = SpanFields.SPAN_ID | SpanFields.TIMESTAMP | SpanFields.SPAN_DURATION; -type DataRow = Pick & {'transaction.duration': number}; +type DataRow = Pick & {'transaction.duration': number}; type Column = GridColumnHeader; @@ -186,7 +186,7 @@ export default function SpanSummaryTable(props: Props) { }); const mergedData: DataRow[] = - rowData?.map((row: Pick) => { + rowData?.map((row: Pick) => { const transactionId = row[SpanFields.TRANSACTION_SPAN_ID]; const newRow = { ...row, diff --git a/static/app/views/traces/fieldRenderers.tsx b/static/app/views/traces/fieldRenderers.tsx index d076521919400e..03011fb7d6b0d5 100644 --- a/static/app/views/traces/fieldRenderers.tsx +++ b/static/app/views/traces/fieldRenderers.tsx @@ -24,7 +24,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import useOrganization from 'sentry/utils/useOrganization'; import usePageFilters from 'sentry/utils/usePageFilters'; import useProjects from 'sentry/utils/useProjects'; -import type {EAPSpanResponse, SpanFields} from 'sentry/views/insights/types'; +import type {SpanFields, SpanResponse} from 'sentry/views/insights/types'; import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs'; import {getTraceDetailsUrl} from 'sentry/views/performance/traceDetails/utils'; import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils'; @@ -468,7 +468,7 @@ export function SpanTimeRenderer({ ); } -type SpanStatus = EAPSpanResponse[SpanFields.SPAN_STATUS]; +type SpanStatus = SpanResponse[SpanFields.SPAN_STATUS]; const STATUS_TO_TAG_TYPE: Record = { ok: 'success', From 54ebebc0788048dafa2571bf9c1380cbb9907e51 Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Mon, 21 Jul 2025 13:51:42 -0400 Subject: [PATCH 2/4] wip --- .../views/insights/common/queries/useDiscover.ts | 11 ++++------- .../insights/common/queries/useDiscoverSeries.ts | 5 +---- .../common/queries/useTopNDiscoverMultiSeries.ts | 5 +---- .../common/queries/useTopNDiscoverSeries.ts | 16 +++------------- 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/static/app/views/insights/common/queries/useDiscover.ts b/static/app/views/insights/common/queries/useDiscover.ts index a74e7e03538560..e23d8d556b44d0 100644 --- a/static/app/views/insights/common/queries/useDiscover.ts +++ b/static/app/views/insights/common/queries/useDiscover.ts @@ -6,7 +6,7 @@ import type {MutableSearch} from 'sentry/utils/tokenizeSearch'; import usePageFilters from 'sentry/utils/usePageFilters'; import type {SamplingMode} from 'sentry/views/explore/hooks/useProgressiveQuery'; import {useWrappedDiscoverQuery} from 'sentry/views/insights/common/queries/useSpansQuery'; -import type {EAPSpanProperty, EAPSpanResponse} from 'sentry/views/insights/types'; +import type {SpanProperty, SpanResponse} from 'sentry/views/insights/types'; interface UseDiscoverQueryOptions { additonalQueryKey?: string[]; @@ -34,11 +34,11 @@ interface UseDiscoverOptions { // The default sampling mode for eap queries export const DEFAULT_SAMPLING_MODE: SamplingMode = 'NORMAL'; -export const useSpans = ( +export const useSpans = ( options: UseDiscoverOptions = {}, referrer: string ) => { - return useDiscover( + return useDiscover( options, DiscoverDatasets.SPANS_EAP_RPC, referrer @@ -64,9 +64,6 @@ const useDiscover = >, Respo useQueryOptions, } = options; - // TODO: remove this check with eap - const shouldSetSamplingMode = dataset === DiscoverDatasets.SPANS_EAP_RPC; - const pageFilters = usePageFilters(); const eventView = getEventView( @@ -87,7 +84,7 @@ const useDiscover = >, Respo referrer, cursor, noPagination, - samplingMode: shouldSetSamplingMode ? samplingMode : undefined, + samplingMode, additionalQueryKey: useQueryOptions?.additonalQueryKey, keepPreviousData: options.keepPreviousData, }); diff --git a/static/app/views/insights/common/queries/useDiscoverSeries.ts b/static/app/views/insights/common/queries/useDiscoverSeries.ts index a0776c00856697..f7adc46b8595a1 100644 --- a/static/app/views/insights/common/queries/useDiscoverSeries.ts +++ b/static/app/views/insights/common/queries/useDiscoverSeries.ts @@ -67,9 +67,6 @@ const useDiscoverSeries = ( const location = useLocation(); const organization = useOrganization(); - // TODO: remove this check with eap - const shouldSetSamplingMode = dataset === DiscoverDatasets.SPANS_EAP_RPC; - const eventView = getSeriesEventView( search, undefined, @@ -103,7 +100,7 @@ const useDiscoverSeries = ( orderby: eventView.sorts?.[0] ? encodeSort(eventView.sorts?.[0]) : undefined, interval: eventView.interval, transformAliasToInputFormat: options.transformAliasToInputFormat ? '1' : '0', - sampling: shouldSetSamplingMode ? samplingMode : undefined, + sampling: samplingMode, }), options: { enabled: options.enabled && defaultPageFilters.isReady, diff --git a/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts b/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts index 5d98c3170a58ed..dee86964112547 100644 --- a/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts +++ b/static/app/views/insights/common/queries/useTopNDiscoverMultiSeries.ts @@ -74,9 +74,6 @@ const useTopNDiscoverMultiSeries = < const location = useLocation(); const organization = useOrganization(); - // TODO: remove this check with eap - const shouldSetSamplingMode = dataset === DiscoverDatasets.SPANS_EAP_RPC; - const eventView = getSeriesEventView( search, [...fields, ...yAxis], @@ -104,7 +101,7 @@ const useTopNDiscoverMultiSeries = < orderby: eventView.sorts?.[0] ? encodeSort(eventView.sorts?.[0]) : undefined, interval: eventView.interval, transformAliasToInputFormat: options.transformAliasToInputFormat ? '1' : '0', - sampling: shouldSetSamplingMode ? samplingMode : undefined, + sampling: samplingMode, }), options: { enabled: options.enabled && defaultPageFilters.isReady, diff --git a/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts b/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts index 959ce88670c0ca..a0073fd5b0884f 100644 --- a/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts +++ b/static/app/views/insights/common/queries/useTopNDiscoverSeries.ts @@ -19,7 +19,7 @@ import { getRetryDelay, shouldRetryHandler, } from 'sentry/views/insights/common/utils/retryHandlers'; -import type {SpanFields, SpanFunctions, SpanProperty} from 'sentry/views/insights/types'; +import type {SpanProperty} from 'sentry/views/insights/types'; import {convertDiscoverTimeseriesResponse} from './convertDiscoverTimeseriesResponse'; @@ -38,14 +38,7 @@ interface UseMetricsSeriesOptions { transformAliasToInputFormat?: boolean; } -export const useTopNSpanSeries = < - Fields extends - | SpanProperty[] - | SpanProperty[] - | SpanFields[] - | SpanFunctions[] - | string[], ->( +export const useTopNSpanSeries = ( options: UseMetricsSeriesOptions, referrer: string, pageFilters?: PageFilters @@ -77,9 +70,6 @@ const useTopNDiscoverSeries = ( const location = useLocation(); const organization = useOrganization(); - // TODO: remove this check with eap - const shouldSetSamplingMode = dataset === DiscoverDatasets.SPANS_EAP_RPC; - const eventView = getSeriesEventView( search, fields, @@ -109,7 +99,7 @@ const useTopNDiscoverSeries = ( orderby: sort ? encodeSort(sort) : undefined, interval: eventView.interval, transformAliasToInputFormat: options.transformAliasToInputFormat ? '1' : '0', - sampling: shouldSetSamplingMode ? samplingMode : undefined, + sampling: samplingMode, }), options: { enabled: options.enabled && defaultPageFilters.isReady, From fa92a5ee7965dc21263d4d071040c4bb32f34d6d Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Mon, 21 Jul 2025 14:04:36 -0400 Subject: [PATCH 3/4] tsc --- .../insights/common/queries/useSpanSamples.tsx | 13 +++++-------- static/app/views/insights/types.tsx | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/static/app/views/insights/common/queries/useSpanSamples.tsx b/static/app/views/insights/common/queries/useSpanSamples.tsx index 1f05d98e6ab374..056614feef82ca 100644 --- a/static/app/views/insights/common/queries/useSpanSamples.tsx +++ b/static/app/views/insights/common/queries/useSpanSamples.tsx @@ -11,9 +11,9 @@ import {useSpanSeries} from 'sentry/views/insights/common/queries/useDiscoverSer import {getDateConditions} from 'sentry/views/insights/common/utils/getDateConditions'; import {useInsightsEap} from 'sentry/views/insights/common/utils/useEap'; import type { - EAPSpanProperty, - EAPSpanResponse, + SpanProperty, SpanQueryFilters, + SpanResponse, SubregionCode, } from 'sentry/views/insights/types'; import {SpanFields} from 'sentry/views/insights/types'; @@ -32,7 +32,7 @@ type Options = { }; export type SpanSample = Pick< - EAPSpanResponse, + SpanProperty, | SpanFields.SPAN_SELF_TIME | SpanFields.TRANSACTION_SPAN_ID | SpanFields.PROJECT @@ -51,10 +51,7 @@ export type DefaultSpanSampleFields = | SpanFields.PROFILEID | SpanFields.SPAN_SELF_TIME; -export type NonDefaultSpanSampleFields = Exclude< - EAPSpanProperty, - DefaultSpanSampleFields ->; +export type NonDefaultSpanSampleFields = Exclude; export const useSpanSamples = ( options: Options @@ -118,7 +115,7 @@ export const useSpanSamples = ( ); type DataRow = Pick< - EAPSpanResponse, + SpanResponse, Fields[number] | DefaultSpanSampleFields // These fields are returned by default >; diff --git a/static/app/views/insights/types.tsx b/static/app/views/insights/types.tsx index 60681434ed026f..05cfb538dc79ff 100644 --- a/static/app/views/insights/types.tsx +++ b/static/app/views/insights/types.tsx @@ -303,7 +303,7 @@ export type SpanStringFields = type SpanStringArrayFields = 'span.domain'; -export const COUNTER_AGGREGATES = ['sum', 'avg', 'min', 'max', 'p100'] as const; +export const COUNTER_AGGREGATES = ['sum', 'avg', 'min', 'max', 'p100', 'count'] as const; export const DISTRIBUTION_AGGREGATES = ['p50', 'p75', 'p90', 'p95', 'p99'] as const; export type Aggregate = From 44fcf4ec4d2100a44721edf93f017aadd5ddaec5 Mon Sep 17 00:00:00 2001 From: Dominik Buszowiecki Date: Mon, 21 Jul 2025 14:06:04 -0400 Subject: [PATCH 4/4] tsc --- static/app/views/insights/common/queries/useSpanSamples.tsx | 2 +- static/app/views/insights/types.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/static/app/views/insights/common/queries/useSpanSamples.tsx b/static/app/views/insights/common/queries/useSpanSamples.tsx index 056614feef82ca..35359e8823043e 100644 --- a/static/app/views/insights/common/queries/useSpanSamples.tsx +++ b/static/app/views/insights/common/queries/useSpanSamples.tsx @@ -32,7 +32,7 @@ type Options = { }; export type SpanSample = Pick< - SpanProperty, + SpanResponse, | SpanFields.SPAN_SELF_TIME | SpanFields.TRANSACTION_SPAN_ID | SpanFields.PROJECT diff --git a/static/app/views/insights/types.tsx b/static/app/views/insights/types.tsx index 05cfb538dc79ff..a0166172a1bdb3 100644 --- a/static/app/views/insights/types.tsx +++ b/static/app/views/insights/types.tsx @@ -226,6 +226,7 @@ export type SpanStringFields = | SpanFields.RESOURCE_RENDER_BLOCKING_STATUS | SpanFields.RAW_DOMAIN | SpanFields.ID + | SpanFields.SPAN_ID | SpanFields.NAME | SpanFields.KIND | SpanFields.STATUS_MESSAGE @@ -267,6 +268,7 @@ export type SpanStringFields = | SpanFields.TRACE_STATUS | SpanFields.APP_START_TYPE | SpanFields.FILE_EXTENSION + | SpanFields.TIMESTAMP | 'span_id' | 'span.op' | 'span.description'