Skip to content

Commit f46f9f7

Browse files
authored
ref(insights): rename EAPSpanProperty to SpanProperty (#95902)
Renaming this, no need to specify it's EAP now that there is only one dataset
1 parent 543b5f1 commit f46f9f7

File tree

61 files changed

+156
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+156
-200
lines changed

static/app/views/explore/tables/tracesTable/fieldRenderers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import useProjects from 'sentry/utils/useProjects';
2323
import type {TraceResult} from 'sentry/views/explore/hooks/useTraces';
2424
import {BREAKDOWN_SLICES} from 'sentry/views/explore/hooks/useTraces';
2525
import type {SpanResult} from 'sentry/views/explore/hooks/useTraceSpans';
26-
import type {EAPSpanResponse, SpanFields} from 'sentry/views/insights/types';
26+
import type {SpanFields, SpanResponse} from 'sentry/views/insights/types';
2727
import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs';
2828
import {getTraceDetailsUrl} from 'sentry/views/performance/traceDetails/utils';
2929

@@ -482,7 +482,7 @@ export function SpanTimeRenderer({
482482
);
483483
}
484484

485-
type SpanStatus = EAPSpanResponse[SpanFields.SPAN_STATUS];
485+
type SpanStatus = SpanResponse[SpanFields.SPAN_STATUS];
486486

487487
const STATUS_TO_TAG_TYPE: Record<SpanStatus, keyof Theme['tag']> = {
488488
ok: 'success',

static/app/views/insights/agentMonitoring/utils/query.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// These are the span op we are currently ingesting.
22

3-
import {type EAPSpanProperty, SpanFields} from 'sentry/views/insights/types';
3+
import {SpanFields, type SpanProperty} from 'sentry/views/insights/types';
44

55
// AI Runs - equivalent to OTEL Invoke Agent span
66
// 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
5353
export const AI_INPUT_TOKENS_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_INPUT_TOKENS})`;
5454
export const AI_OUTPUT_TOKENS_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS})`;
5555
export const AI_OUTPUT_TOKENS_REASONING_ATTRIBUTE_SUM =
56-
`sum(tags[${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING}, number])` as EAPSpanProperty;
56+
`sum(tags[${SpanFields.GEN_AI_USAGE_OUTPUT_TOKENS_REASONING}, number])` as SpanProperty;
5757
export const AI_INPUT_TOKENS_CACHED_ATTRIBUTE_SUM =
58-
`sum(tags[${SpanFields.GEN_AI_USAGE_INPUT_TOKENS_CACHED}, number])` as EAPSpanProperty;
58+
`sum(tags[${SpanFields.GEN_AI_USAGE_INPUT_TOKENS_CACHED}, number])` as SpanProperty;
5959
export const AI_COST_ATTRIBUTE_SUM = `sum(${SpanFields.GEN_AI_USAGE_TOTAL_COST})`;
6060

6161
export const legacyAttributeKeys = new Map<string, string[]>([

static/app/views/insights/browser/resources/components/sampleImages.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import ResourceSize from 'sentry/views/insights/browser/resources/components/res
1919
import {useResourceModuleFilters} from 'sentry/views/insights/browser/resources/utils/useResourceFilters';
2020
import ChartPanel from 'sentry/views/insights/common/components/chartPanel';
2121
import {useSpans} from 'sentry/views/insights/common/queries/useDiscover';
22-
import type {EAPSpanResponse} from 'sentry/views/insights/types';
22+
import type {SpanResponse} from 'sentry/views/insights/types';
2323
import {SpanFields} from 'sentry/views/insights/types';
2424
import {usePerformanceGeneralProjectSettings} from 'sentry/views/performance/utils';
2525

@@ -97,7 +97,7 @@ function SampleImages({groupId, projectId}: Props) {
9797
}
9898

9999
type ImageSpan = Pick<
100-
EAPSpanResponse,
100+
SpanResponse,
101101
| 'span.group'
102102
| 'raw_domain'
103103
| 'span.description'

static/app/views/insights/browser/resources/components/tables/resourceSummaryTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
DataTitles,
3131
getThroughputTitle,
3232
} from 'sentry/views/insights/common/views/spans/types';
33-
import {type EAPSpanResponse, ModuleName, SpanFields} from 'sentry/views/insights/types';
33+
import {ModuleName, SpanFields, type SpanResponse} from 'sentry/views/insights/types';
3434

3535
const {
3636
RESOURCE_RENDER_BLOCKING_STATUS,
@@ -41,7 +41,7 @@ const {
4141
} = SpanFields;
4242

4343
type Row = Pick<
44-
EAPSpanResponse,
44+
SpanResponse,
4545
| 'avg(http.response_content_length)'
4646
| 'avg(span.self_time)'
4747
| 'epm()'

static/app/views/insights/browser/resources/components/tables/resourceTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {
3939
DataTitles,
4040
getThroughputTitle,
4141
} from 'sentry/views/insights/common/views/spans/types';
42-
import type {EAPSpanResponse} from 'sentry/views/insights/types';
42+
import type {SpanResponse} from 'sentry/views/insights/types';
4343
import {ModuleName, SpanFields, SpanFunction} from 'sentry/views/insights/types';
4444

4545
const {
@@ -58,7 +58,7 @@ const RESOURCE_SIZE_ALERT = t(
5858
);
5959

6060
type Row = Pick<
61-
EAPSpanResponse,
61+
SpanResponse,
6262
| 'avg(http.response_content_length)'
6363
| 'avg(span.self_time)'
6464
| 'epm()'

static/app/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import type {
22
ProjectScore,
33
WebVitals,
44
} from 'sentry/views/insights/browser/webVitals/types';
5-
import type {EAPSpanResponse} from 'sentry/views/insights/types';
5+
import type {SpanResponse} from 'sentry/views/insights/types';
66

77
type PerformanceScores = Pick<
8-
EAPSpanResponse,
8+
SpanResponse,
99
| 'performance_score(measurements.score.cls)'
1010
| 'performance_score(measurements.score.fcp)'
1111
| 'performance_score(measurements.score.inp)'
@@ -14,7 +14,7 @@ type PerformanceScores = Pick<
1414
>;
1515

1616
type CountScores = Pick<
17-
EAPSpanResponse,
17+
SpanResponse,
1818
| 'count_scores(measurements.score.cls)'
1919
| 'count_scores(measurements.score.fcp)'
2020
| 'count_scores(measurements.score.inp)'

static/app/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import type {BrowserType} from 'sentry/views/insights/browser/webVitals/utils/qu
1111
import {useWebVitalsSort} from 'sentry/views/insights/browser/webVitals/utils/useWebVitalsSort';
1212
import {useSpans} from 'sentry/views/insights/common/queries/useDiscover';
1313
import {
14-
type EAPSpanProperty,
1514
SpanFields,
15+
type SpanProperty,
1616
type SubregionCode,
1717
} from 'sentry/views/insights/types';
1818

@@ -44,7 +44,7 @@ export const useTransactionWebVitalsScoresQuery = ({
4444
const sort = useWebVitalsSort({sortName, defaultSort});
4545

4646
const totalOpportunityScoreField =
47-
'opportunity_score(measurements.score.total)' satisfies EAPSpanProperty;
47+
'opportunity_score(measurements.score.total)' satisfies SpanProperty;
4848

4949
if (sort !== undefined) {
5050
if (sort.field === 'avg(measurements.score.total)') {

static/app/views/insights/browser/webVitals/settings.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {t} from 'sentry/locale';
2-
import type {EAPSpanProperty} from 'sentry/views/insights/types';
2+
import type {SpanProperty} from 'sentry/views/insights/types';
33

44
export const MODULE_TITLE = t('Web Vitals');
55
export const BASE_URL = 'pageloads';
@@ -20,4 +20,4 @@ export const FIELD_ALIASES = {
2020
'p75(measurements.inp)': 'INP',
2121
'p75(measurements.cls)': 'CLS',
2222
'p75(measurements.ttfb)': 'TTFB',
23-
} satisfies Partial<Record<EAPSpanProperty, string>>;
23+
} satisfies Partial<Record<SpanProperty, string>>;

static/app/views/insights/cache/components/samplePanel.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
getThroughputTitle,
3636
} from 'sentry/views/insights/common/views/spans/types';
3737
import {InsightsSpanTagProvider} from 'sentry/views/insights/pages/insightsSpanTagProvider';
38-
import type {EAPSpanResponse, SpanQueryFilters} from 'sentry/views/insights/types';
38+
import type {SpanQueryFilters, SpanResponse} from 'sentry/views/insights/types';
3939
import {ModuleName, SpanFields, SpanFunction} from 'sentry/views/insights/types';
4040

4141
// 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() {
115115
['project.id']: query.project,
116116
};
117117

118-
const useIndexedCacheSpans = (
119-
isCacheHit: EAPSpanResponse['cache.hit'],
120-
limit: number
121-
) =>
118+
const useIndexedCacheSpans = (isCacheHit: SpanResponse['cache.hit'], limit: number) =>
122119
useSpans(
123120
{
124121
search: MutableSearch.fromQueryObject({

static/app/views/insights/cache/components/tables/spanSamplesTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import useOrganization from 'sentry/utils/useOrganization';
1616
import {CacheHitMissCell} from 'sentry/views/insights/cache/components/tables/cacheHitMissCell';
1717
import {renderHeadCell} from 'sentry/views/insights/common/components/tableCells/renderHeadCell';
1818
import {SpanIdCell} from 'sentry/views/insights/common/components/tableCells/spanIdCell';
19-
import type {EAPSpanResponse} from 'sentry/views/insights/types';
19+
import type {SpanResponse} from 'sentry/views/insights/types';
2020
import {ModuleName, SpanFields} from 'sentry/views/insights/types';
2121
import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs';
2222

@@ -36,7 +36,7 @@ type ColumnKeys =
3636
| SpanFields.CACHE_ITEM_SIZE
3737
| 'transaction.duration';
3838

39-
type DataRow = Pick<EAPSpanResponse, DataRowKeys> & {
39+
type DataRow = Pick<SpanResponse, DataRowKeys> & {
4040
'cache.hit': '' | 'true' | 'false';
4141
'transaction.duration': number; // TODO: this should be a boolean
4242
};

0 commit comments

Comments
 (0)