diff --git a/static/app/views/dashboards/widgetBuilder/utils.spec.tsx b/static/app/views/dashboards/widgetBuilder/utils.spec.tsx index 4f4aa18b3bb424..d395106e2a357b 100644 --- a/static/app/views/dashboards/widgetBuilder/utils.spec.tsx +++ b/static/app/views/dashboards/widgetBuilder/utils.spec.tsx @@ -31,11 +31,11 @@ describe('WidgetBuilder utils', function () { }); it('does not split aggregates with inner commas', function () { - const testFieldsString = 'p75(),count_if(transaction.duration,equal,200),p95()'; + const testFieldsString = 'p75(),count_if(transaction.duration,equals,200),p95()'; const actual = getFields(testFieldsString); expect(actual).toEqual([ 'p75()', - 'count_if(transaction.duration,equal,200)', + 'count_if(transaction.duration,equals,200)', 'p95()', ]); }); diff --git a/static/app/views/insights/agentMonitoring/components/modelsTable.tsx b/static/app/views/insights/agentMonitoring/components/modelsTable.tsx index e7e9d5555d75b1..50126a272b495a 100644 --- a/static/app/views/insights/agentMonitoring/components/modelsTable.tsx +++ b/static/app/views/insights/agentMonitoring/components/modelsTable.tsx @@ -66,7 +66,7 @@ const EMPTY_ARRAY: never[] = []; const defaultColumnOrder: Array> = [ {key: 'model', name: t('Model'), width: COL_WIDTH_UNDEFINED}, {key: 'count()', name: t('Requests'), width: 120}, - {key: 'count_if(span.status,unknown)', name: t('Errors'), width: 120}, + {key: 'count_if(span.status,equals,unknown)', name: t('Errors'), width: 120}, {key: 'avg(span.duration)', name: t('Avg'), width: 100}, {key: 'p95(span.duration)', name: t('P95'), width: 100}, {key: AI_COST_ATTRIBUTE_SUM, name: t('Cost'), width: 100}, @@ -81,7 +81,7 @@ const rightAlignColumns = new Set([ AI_OUTPUT_TOKENS_REASONING_ATTRIBUTE_SUM, AI_INPUT_TOKENS_CACHED_ATTRIBUTE_SUM, AI_COST_ATTRIBUTE_SUM, - 'count_if(span.status,unknown)', + 'count_if(span.status,equals,unknown)', 'avg(span.duration)', 'p95(span.duration)', ]); @@ -123,7 +123,7 @@ export function ModelsTable() { 'count()', 'avg(span.duration)', 'p95(span.duration)', - 'count_if(span.status,unknown)', // spans with status unknown are errors + 'count_if(span.status,equals,unknown)', // spans with status unknown are errors ], sorts: [{field: sortField, kind: sortOrder}], search: fullQuery, @@ -145,7 +145,7 @@ export function ModelsTable() { avg: span['avg(span.duration)'] ?? 0, p95: span['p95(span.duration)'] ?? 0, cost: Number(span[AI_COST_ATTRIBUTE_SUM]), - errors: span['count_if(span.status,unknown)'] ?? 0, + errors: span['count_if(span.status,equals,unknown)'] ?? 0, inputTokens: Number(span[AI_INPUT_TOKENS_ATTRIBUTE_SUM]), inputCachedTokens: Number(span[AI_INPUT_TOKENS_CACHED_ATTRIBUTE_SUM]), outputTokens: Number(span[AI_OUTPUT_TOKENS_ATTRIBUTE_SUM]), @@ -269,7 +269,7 @@ const BodyCell = memo(function BodyCell({ return ; case AI_COST_ATTRIBUTE_SUM: return {formatLLMCosts(dataRow.cost)}; - case 'count_if(span.status,unknown)': + case 'count_if(span.status,equals,unknown)': return ( > = [ {key: 'tool', name: t('Tool Name'), width: COL_WIDTH_UNDEFINED}, {key: 'count()', name: t('Requests'), width: 120}, - {key: 'count_if(span.status,unknown)', name: t('Errors'), width: 120}, + {key: 'count_if(span.status,equals,unknown)', name: t('Errors'), width: 120}, {key: 'avg(span.duration)', name: t('Avg'), width: 100}, {key: 'p95(span.duration)', name: t('P95'), width: 100}, ]; const rightAlignColumns = new Set([ 'count()', - 'count_if(span.status,unknown)', + 'count_if(span.status,equals,unknown)', 'avg(span.duration)', 'p95(span.duration)', ]); @@ -97,7 +97,7 @@ export function ToolsTable() { 'avg(span.duration)', 'p95(span.duration)', 'failure_rate()', - 'count_if(span.status,unknown)', // spans with status unknown are errors + 'count_if(span.status,equals,unknown)', // spans with status unknown are errors ], sorts: [{field: sortField, kind: sortOrder}], search: fullQuery, @@ -118,7 +118,7 @@ export function ToolsTable() { requests: Number(span['count()']), avg: Number(span['avg(span.duration)']), p95: Number(span['p95(span.duration)']), - errors: Number(span['count_if(span.status,unknown)']), + errors: Number(span['count_if(span.status,equals,unknown)']), })); }, [toolsRequest.data]); @@ -218,7 +218,7 @@ const BodyCell = memo(function BodyCell({ return ; case 'p95(span.duration)': return ; - case 'count_if(span.status,unknown)': + case 'count_if(span.status,equals,unknown)': return ( `count_if(span.op,${op})` as const); +const GENERATION_COUNTS = AI_GENERATION_OPS.map( + op => `count_if(span.op,equals,${op})` as const +); const AI_AGENT_SUB_OPS = [...AI_GENERATION_OPS, ...AI_TOOL_CALL_OPS].map( - op => `count_if(span.op,${op})` as const + op => `count_if(span.op,equals,${op})` as const ); export function TracesTable() { @@ -115,7 +117,7 @@ export function TracesTable() { fields: [ 'trace', ...GENERATION_COUNTS, - 'count_if(span.op,gen_ai.execute_tool)', + 'count_if(span.op,equals,gen_ai.execute_tool)', AI_TOKEN_USAGE_ATTRIBUTE_SUM, AI_COST_ATTRIBUTE_SUM, ], @@ -161,7 +163,7 @@ export function TracesTable() { (sum, key) => sum + (span[key] ?? 0), 0 ), - toolCalls: span['count_if(span.op,gen_ai.execute_tool)'] ?? 0, + toolCalls: span['count_if(span.op,equals,gen_ai.execute_tool)'] ?? 0, totalTokens: Number(span[AI_TOKEN_USAGE_ATTRIBUTE_SUM] ?? 0), totalCost: Number(span[AI_COST_ATTRIBUTE_SUM] ?? 0), totalErrors: errors[span.trace] ?? 0, diff --git a/static/app/views/insights/common/components/tableCells/renderHeadCell.tsx b/static/app/views/insights/common/components/tableCells/renderHeadCell.tsx index 53cd9fb45ed09a..eb0fcc61125307 100644 --- a/static/app/views/insights/common/components/tableCells/renderHeadCell.tsx +++ b/static/app/views/insights/common/components/tableCells/renderHeadCell.tsx @@ -65,7 +65,7 @@ const SORTABLE_FIELDS = new Set([ SpanFields.MESSAGING_MESSAGE_DESTINATION_NAME, 'count_op(queue.publish)', 'count_op(queue.process)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'time_spent_percentage(span.duration)', 'transaction', @@ -78,10 +78,10 @@ const SORTABLE_FIELDS = new Set([ 'failure_rate()', 'performance_score(measurements.score.total)', 'count_unique(user)', - 'p50_if(span.duration,is_transaction,true)', - 'p95_if(span.duration,is_transaction,true)', - 'failure_rate_if(is_transaction,true)', - 'sum_if(span.duration,is_transaction,true)', + 'p50_if(span.duration,is_transaction,equals,true)', + 'p95_if(span.duration,is_transaction,equals,true)', + 'failure_rate_if(is_transaction,equals,true)', + 'sum_if(span.duration,is_transaction,equals,true)', 'p75(measurements.frames_slow_rate)', 'p75(measurements.frames_frozen_rate)', 'trace_status_rate(ok)', diff --git a/static/app/views/insights/mobile/appStarts/components/tables/screensTable.spec.tsx b/static/app/views/insights/mobile/appStarts/components/tables/screensTable.spec.tsx index c5b9dacbbf03bc..3748362fe3b89b 100644 --- a/static/app/views/insights/mobile/appStarts/components/tables/screensTable.spec.tsx +++ b/static/app/views/insights/mobile/appStarts/components/tables/screensTable.spec.tsx @@ -76,8 +76,8 @@ describe('AppStartScreens', () => { { id: '1', transaction: 'Screen 1', - 'avg_if(measurements.app_start_cold,release,com.example.vu.android@2.10.5)': 100, - 'avg_if(measurements.app_start_cold,release,com.example.vu.android@2.10.3+42)': 200, + 'avg_if(measurements.app_start_cold,release,equals,com.example.vu.android@2.10.5)': 100, + 'avg_if(measurements.app_start_cold,release,equals,com.example.vu.android@2.10.3+42)': 200, 'avg_compare(measurements.app_start_cold,release,com.example.vu.android@2.10.5,com.example.vu.android@2.10.3+42)': 50, app_start_breakdown: 'breakdown', 'count_starts(measurements.app_start_cold)': 10, diff --git a/static/app/views/insights/mobile/appStarts/components/tables/screensTable.tsx b/static/app/views/insights/mobile/appStarts/components/tables/screensTable.tsx index 9069207a508000..78a5395dae4bab 100644 --- a/static/app/views/insights/mobile/appStarts/components/tables/screensTable.tsx +++ b/static/app/views/insights/mobile/appStarts/components/tables/screensTable.tsx @@ -39,19 +39,19 @@ export function AppStartScreens({data, eventView, isLoading, pageLinks}: Props) const columnNameMap = { transaction: t('Screen'), - [`avg_if(measurements.app_start_cold,release,${primaryRelease})`]: t( + [`avg_if(measurements.app_start_cold,release,equals,${primaryRelease})`]: t( 'Avg Cold Start (%s)', PRIMARY_RELEASE_ALIAS ), - [`avg_if(measurements.app_start_cold,release,${secondaryRelease})`]: t( + [`avg_if(measurements.app_start_cold,release,equals,${secondaryRelease})`]: t( 'Avg Cold Start (%s)', SECONDARY_RELEASE_ALIAS ), - [`avg_if(measurements.app_start_warm,release,${primaryRelease})`]: t( + [`avg_if(measurements.app_start_warm,release,equals,${primaryRelease})`]: t( 'Avg Warm Start (%s)', PRIMARY_RELEASE_ALIAS ), - [`avg_if(measurements.app_start_warm,release,${secondaryRelease})`]: t( + [`avg_if(measurements.app_start_warm,release,equals,${secondaryRelease})`]: t( 'Avg Warm Start (%s)', SECONDARY_RELEASE_ALIAS ), @@ -135,8 +135,8 @@ export function AppStartScreens({data, eventView, isLoading, pageLinks}: Props) pageLinks={pageLinks} columnOrder={[ 'transaction', - `avg_if(measurements.app_start_${startType},release,${primaryRelease})`, - `avg_if(measurements.app_start_${startType},release,${secondaryRelease})`, + `avg_if(measurements.app_start_${startType},release,equals,${primaryRelease})`, + `avg_if(measurements.app_start_${startType},release,equals,${secondaryRelease})`, `avg_compare(measurements.app_start_${startType},release,${primaryRelease},${secondaryRelease})`, 'app_start_breakdown', `count_starts(measurements.app_start_${startType})`, diff --git a/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.spec.tsx b/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.spec.tsx index cb2ae80cf8d177..964494fe6e6ef4 100644 --- a/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.spec.tsx +++ b/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.spec.tsx @@ -54,10 +54,10 @@ describe('SpanOpSelector', function () { 'span.op': 'string', 'span.description': 'string', 'span.group': 'string', - 'avg_if(span.self_time,release,release1)': 'duration', + 'avg_if(span.self_time,release,equals,release1)': 'duration', 'avg_compare(span.self_time,release,release1,release2)': 'percent_change', 'count()': 'integer', - 'avg_if(span.self_time,release,release2)': 'duration', + 'avg_if(span.self_time,release,equals,release2)': 'duration', 'sum(span.self_time)': 'duration', }, }, @@ -67,10 +67,10 @@ describe('SpanOpSelector', function () { 'span.op': 'app.start.warm', 'span.description': 'Application Init', 'span.group': '7f4be68f08c0455f', - 'avg_if(span.self_time,release,release1)': 22.549867, + 'avg_if(span.self_time,release,equals,release1)': 22.549867, 'avg_compare(span.self_time,release,release1,release2)': 0.5, 'count()': 14, - 'avg_if(span.self_time,release,release2)': 12504.931908384617, + 'avg_if(span.self_time,release,equals,release2)': 12504.931908384617, 'sum(span.self_time)': 162586.66467600001, }, ], @@ -115,10 +115,10 @@ describe('SpanOpSelector', function () { 'span.op': 'string', 'span.description': 'string', 'span.group': 'string', - 'avg_if(span.self_time,release,release1)': 'duration', + 'avg_if(span.self_time,release,equals,release1)': 'duration', 'avg_compare(span.self_time,release,release1,release2)': 'percent_change', 'count()': 'integer', - 'avg_if(span.self_time,release,release2)': 'duration', + 'avg_if(span.self_time,release,equals,release2)': 'duration', 'sum(span.self_time)': 'duration', }, }, @@ -132,8 +132,8 @@ describe('SpanOpSelector', function () { 'sum(span.self_time)': 162586.66467600001, // simulate a scenario where a span was added in release 2 - 'avg_if(span.self_time,release,release1)': 0, - 'avg_if(span.self_time,release,release2)': 12504.931908384617, + 'avg_if(span.self_time,release,equals,release1)': 0, + 'avg_if(span.self_time,release,equals,release2)': 12504.931908384617, 'avg_compare(span.self_time,release,release1,release2)': null, }, ], diff --git a/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.tsx b/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.tsx index 8a456a1b2fcb50..906518d15e84d5 100644 --- a/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.tsx +++ b/static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.tsx @@ -117,8 +117,8 @@ export function SpanOperationTable({ SPAN_OP, SPAN_GROUP, SPAN_DESCRIPTION, - `avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`, - `avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`, `avg_compare(${SPAN_SELF_TIME},release,${primaryRelease},${secondaryRelease})`, `sum(${SPAN_SELF_TIME})`, ], @@ -131,11 +131,11 @@ export function SpanOperationTable({ const columnNameMap = { [SPAN_OP]: t('Operation'), [SPAN_DESCRIPTION]: t('Span Description'), - [`avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`]: t( + [`avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`]: t( 'Avg Duration (%s)', PRIMARY_RELEASE_ALIAS ), - [`avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`]: t( + [`avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`]: t( 'Avg Duration (%s)', SECONDARY_RELEASE_ALIAS ), @@ -249,8 +249,8 @@ export function SpanOperationTable({ columnOrder={[ String(SPAN_OP), String(SPAN_DESCRIPTION), - `avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`, - `avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`, `avg_compare(${SPAN_SELF_TIME},release,${primaryRelease},${secondaryRelease})`, ].map(col => { return {key: col, name: columnNameMap[col] ?? col, width: COL_WIDTH_UNDEFINED}; diff --git a/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.spec.tsx b/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.spec.tsx index 930940332d1007..f445f7ae18e2a2 100644 --- a/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.spec.tsx +++ b/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.spec.tsx @@ -101,12 +101,12 @@ describe('Screen Summary', function () { data: [ { 'span.op': 'app.start.cold', - 'avg_if(span.duration,release,com.example.vu.android@2.10.5)': 1000, - 'avg_if(span.duration,release,com.example.vu.android@2.10.3+42)': 2000, + 'avg_if(span.duration,release,equals,com.example.vu.android@2.10.5)': 1000, + 'avg_if(span.duration,release,equals,com.example.vu.android@2.10.3+42)': 2000, 'avg_compare(span.duration,release,com.example.vu.android@2.10.5,com.example.vu.android@2.10.3+42)': -0.5, - 'count_if(release,com.example.vu.android@2.10.5)': 20, - 'count_if(release,com.example.vu.android@2.10.3+42)': 10, + 'count_if(release,equals,com.example.vu.android@2.10.5)': 20, + 'count_if(release,equals,com.example.vu.android@2.10.3+42)': 10, }, ], }, diff --git a/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.tsx b/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.tsx index 4bea5a9684118b..c77455e11ec8d9 100644 --- a/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.tsx +++ b/static/app/views/insights/mobile/appStarts/views/screenSummaryPage.tsx @@ -139,11 +139,11 @@ export function ScreenSummaryContentPage() { ')', ]} fields={[ - `avg_if(span.duration,release,${primaryRelease})`, - `avg_if(span.duration,release,${secondaryRelease})`, + `avg_if(span.duration,release,equals,${primaryRelease})`, + `avg_if(span.duration,release,equals,${secondaryRelease})`, `avg_compare(span.duration,release,${primaryRelease},${secondaryRelease})`, - `count_if(release,${primaryRelease})`, - `count_if(release,${secondaryRelease})`, + `count_if(release,equals,${primaryRelease})`, + `count_if(release,equals,${secondaryRelease})`, ]} blocks={[ { @@ -153,7 +153,7 @@ export function ScreenSummaryContentPage() { appStartType === COLD_START_TYPE ? t('Avg Cold Start (%s)', PRIMARY_RELEASE_ALIAS) : t('Avg Warm Start (%s)', PRIMARY_RELEASE_ALIAS), - dataKey: `avg_if(span.duration,release,${primaryRelease})`, + dataKey: `avg_if(span.duration,release,equals,${primaryRelease})`, }, { unit: DurationUnit.MILLISECOND, @@ -162,7 +162,7 @@ export function ScreenSummaryContentPage() { appStartType === COLD_START_TYPE ? t('Avg Cold Start (%s)', SECONDARY_RELEASE_ALIAS) : t('Avg Warm Start (%s)', SECONDARY_RELEASE_ALIAS), - dataKey: `avg_if(span.duration,release,${secondaryRelease})`, + dataKey: `avg_if(span.duration,release,equals,${secondaryRelease})`, }, { unit: 'percent_change', @@ -173,12 +173,12 @@ export function ScreenSummaryContentPage() { { unit: 'count', title: t('Count (%s)', PRIMARY_RELEASE_ALIAS), - dataKey: `count_if(release,${primaryRelease})`, + dataKey: `count_if(release,equals,${primaryRelease})`, }, { unit: 'count', title: t('Count (%s)', SECONDARY_RELEASE_ALIAS), - dataKey: `count_if(release,${secondaryRelease})`, + dataKey: `count_if(release,equals,${secondaryRelease})`, }, ]} referrer="api.starfish.mobile-startup-totals" diff --git a/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.spec.tsx b/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.spec.tsx index c66e92e36ac587..2b43b606368514 100644 --- a/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.spec.tsx +++ b/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.spec.tsx @@ -81,8 +81,8 @@ describe('ScreenLoadSpansTable', function () { 'span.op', 'span.group', 'span.description', - 'avg_if(span.self_time,release,io.sentry.samples.android@7.0.0+2)', - 'avg_if(span.self_time,release,io.sentry.samples.android@6.27.0+2)', + 'avg_if(span.self_time,release,equals,io.sentry.samples.android@7.0.0+2)', + 'avg_if(span.self_time,release,equals,io.sentry.samples.android@6.27.0+2)', 'ttid_contribution_rate()', 'ttfd_contribution_rate()', 'count()', diff --git a/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.tsx b/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.tsx index 0d0bb689834f04..019f41f2f99214 100644 --- a/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.tsx +++ b/static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.tsx @@ -108,8 +108,8 @@ export function ScreenLoadSpansTable({ SPAN_OP, SPAN_GROUP, SPAN_DESCRIPTION, - `avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`, - `avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`, 'ttid_contribution_rate()', 'ttfd_contribution_rate()', 'count()', @@ -125,11 +125,11 @@ export function ScreenLoadSpansTable({ 'count()': t('Total Count'), affects: hasTTFD ? t('Affects') : t('Affects TTID'), [`sum(${SPAN_SELF_TIME})`]: t('Total Time Spent'), - [`avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`]: t( + [`avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`]: t( 'Avg Duration (%s)', PRIMARY_RELEASE_ALIAS ), - [`avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`]: t( + [`avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`]: t( 'Avg Duration (%s)', SECONDARY_RELEASE_ALIAS ), @@ -351,8 +351,8 @@ export function ScreenLoadSpansTable({ columnOrder={[ String(SPAN_OP), String(SPAN_DESCRIPTION), - `avg_if(${SPAN_SELF_TIME},release,${primaryRelease})`, - `avg_if(${SPAN_SELF_TIME},release,${secondaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${primaryRelease})`, + `avg_if(${SPAN_SELF_TIME},release,equals,${secondaryRelease})`, ...(organization.features.includes('insights-initial-modules') ? ['affects'] : []), diff --git a/static/app/views/insights/mobile/screenload/views/screenLoadSpansPage.tsx b/static/app/views/insights/mobile/screenload/views/screenLoadSpansPage.tsx index 84c2b0a4290306..a881040adac277 100644 --- a/static/app/views/insights/mobile/screenload/views/screenLoadSpansPage.tsx +++ b/static/app/views/insights/mobile/screenload/views/screenLoadSpansPage.tsx @@ -78,42 +78,42 @@ export function ScreenLoadSpansContent() { `transaction:${transactionName}`, ]} fields={[ - `avg_if(measurements.time_to_initial_display,release,${primaryRelease})`, - `avg_if(measurements.time_to_initial_display,release,${secondaryRelease})`, - `avg_if(measurements.time_to_full_display,release,${primaryRelease})`, - `avg_if(measurements.time_to_full_display,release,${secondaryRelease})`, - `count_if(measurements.time_to_initial_display,release,${primaryRelease})`, - `count_if(measurements.time_to_initial_display,release,${secondaryRelease})`, + `avg_if(measurements.time_to_initial_display,release,equals,${primaryRelease})`, + `avg_if(measurements.time_to_initial_display,release,equals,${secondaryRelease})`, + `avg_if(measurements.time_to_full_display,release,equals,${primaryRelease})`, + `avg_if(measurements.time_to_full_display,release,equals,${secondaryRelease})`, + `count_if(measurements.time_to_initial_display,release,equals,${primaryRelease})`, + `count_if(measurements.time_to_initial_display,release,equals,${secondaryRelease})`, ]} blocks={[ { unit: DurationUnit.MILLISECOND, - dataKey: `avg_if(measurements.time_to_initial_display,release,${primaryRelease})`, + dataKey: `avg_if(measurements.time_to_initial_display,release,equals,${primaryRelease})`, title: t('Avg TTID (%s)', PRIMARY_RELEASE_ALIAS), }, { unit: DurationUnit.MILLISECOND, - dataKey: `avg_if(measurements.time_to_initial_display,release,${secondaryRelease})`, + dataKey: `avg_if(measurements.time_to_initial_display,release,equals,${secondaryRelease})`, title: t('Avg TTID (%s)', SECONDARY_RELEASE_ALIAS), }, { unit: DurationUnit.MILLISECOND, - dataKey: `avg_if(measurements.time_to_full_display,release,${primaryRelease})`, + dataKey: `avg_if(measurements.time_to_full_display,release,equals,${primaryRelease})`, title: t('Avg TTFD (%s)', PRIMARY_RELEASE_ALIAS), }, { unit: DurationUnit.MILLISECOND, - dataKey: `avg_if(measurements.time_to_full_display,release,${secondaryRelease})`, + dataKey: `avg_if(measurements.time_to_full_display,release,equals,${secondaryRelease})`, title: t('Avg TTFD (%s)', SECONDARY_RELEASE_ALIAS), }, { unit: 'count', - dataKey: `count_if(measurements.time_to_initial_display,release,${primaryRelease})`, + dataKey: `count_if(measurements.time_to_initial_display,release,equals,${primaryRelease})`, title: t('Total Count (%s)', PRIMARY_RELEASE_ALIAS), }, { unit: 'count', - dataKey: `count_if(measurements.time_to_initial_display,release,${secondaryRelease})`, + dataKey: `count_if(measurements.time_to_initial_display,release,equals,${secondaryRelease})`, title: t('Total Count (%s)', SECONDARY_RELEASE_ALIAS), }, ]} diff --git a/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.spec.tsx b/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.spec.tsx index fc600886a4b791..c3cfe742a3344a 100644 --- a/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.spec.tsx +++ b/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.spec.tsx @@ -50,12 +50,12 @@ describe('SpanOperationTable', () => { 'span.op', 'span.group', 'span.description', - 'division_if(mobile.slow_frames,mobile.total_frames,release,foo)', - 'division_if(mobile.slow_frames,mobile.total_frames,release,bar)', - 'division_if(mobile.frozen_frames,mobile.total_frames,release,foo)', - 'division_if(mobile.frozen_frames,mobile.total_frames,release,bar)', - 'avg_if(mobile.frames_delay,release,foo)', - 'avg_if(mobile.frames_delay,release,bar)', + 'division_if(mobile.slow_frames,mobile.total_frames,release,equals,foo)', + 'division_if(mobile.slow_frames,mobile.total_frames,release,equals,bar)', + 'division_if(mobile.frozen_frames,mobile.total_frames,release,equals,foo)', + 'division_if(mobile.frozen_frames,mobile.total_frames,release,equals,bar)', + 'avg_if(mobile.frames_delay,release,equals,foo)', + 'avg_if(mobile.frames_delay,release,equals,bar)', 'avg_compare(mobile.frames_delay,release,foo,bar)', ], }), diff --git a/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.tsx b/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.tsx index 6b3be48b11b838..d4b32d22751fa3 100644 --- a/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.tsx +++ b/static/app/views/insights/mobile/ui/components/tables/spanOperationTable.tsx @@ -75,12 +75,12 @@ export function SpanOperationTable({ SPAN_OP, SPAN_GROUP, SPAN_DESCRIPTION, - `division_if(mobile.slow_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.slow_frames,mobile.total_frames,release,${secondaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${secondaryRelease})`, - `avg_if(mobile.frames_delay,release,${primaryRelease})`, - `avg_if(mobile.frames_delay,release,${secondaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${primaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${secondaryRelease})`, `avg_compare(mobile.frames_delay,release,${primaryRelease},${secondaryRelease})`, ], query: queryStringPrimary, @@ -103,12 +103,12 @@ export function SpanOperationTable({ SPAN_OP, SPAN_GROUP, SPAN_DESCRIPTION, - `division_if(mobile.slow_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.slow_frames,mobile.total_frames,release,${secondaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${secondaryRelease})`, - `avg_if(mobile.frames_delay,release,${primaryRelease})`, - `avg_if(mobile.frames_delay,release,${secondaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${primaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${secondaryRelease})`, `avg_compare(mobile.frames_delay,release,${primaryRelease},${secondaryRelease})`, ], }, @@ -118,21 +118,19 @@ export function SpanOperationTable({ const columnNameMap = { [SPAN_OP]: t('Operation'), [SPAN_DESCRIPTION]: t('Span Description'), - [`division_if(mobile.slow_frames,mobile.total_frames,release,${primaryRelease})`]: t( - 'Slow (%s)', - PRIMARY_RELEASE_ALIAS - ), - [`division_if(mobile.slow_frames,mobile.total_frames,release,${secondaryRelease})`]: + [`division_if(mobile.slow_frames,mobile.total_frames,release,equals,${primaryRelease})`]: + t('Slow (%s)', PRIMARY_RELEASE_ALIAS), + [`division_if(mobile.slow_frames,mobile.total_frames,release,equals,${secondaryRelease})`]: t('Slow (%s)', SECONDARY_RELEASE_ALIAS), - [`division_if(mobile.frozen_frames,mobile.total_frames,release,${primaryRelease})`]: + [`division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${primaryRelease})`]: t('Frozen (%s)', PRIMARY_RELEASE_ALIAS), - [`division_if(mobile.frozen_frames,mobile.total_frames,release,${secondaryRelease})`]: + [`division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${secondaryRelease})`]: t('Frozen (%s)', SECONDARY_RELEASE_ALIAS), - [`avg_if(mobile.frames_delay,release,${primaryRelease})`]: t( + [`avg_if(mobile.frames_delay,release,equals,${primaryRelease})`]: t( 'Delay (%s)', PRIMARY_RELEASE_ALIAS ), - [`avg_if(mobile.frames_delay,release,${secondaryRelease})`]: t( + [`avg_if(mobile.frames_delay,release,equals,${secondaryRelease})`]: t( 'Delay (%s)', SECONDARY_RELEASE_ALIAS ), @@ -141,21 +139,19 @@ export function SpanOperationTable({ }; const columnTooltipMap = { - [`division_if(mobile.slow_frames,mobile.total_frames,release,${primaryRelease})`]: t( - 'The number of slow frames divided by total frames (%s)', - PRIMARY_RELEASE_ALIAS - ), - [`division_if(mobile.slow_frames,mobile.total_frames,release,${secondaryRelease})`]: + [`division_if(mobile.slow_frames,mobile.total_frames,release,equals,${primaryRelease})`]: + t('The number of slow frames divided by total frames (%s)', PRIMARY_RELEASE_ALIAS), + [`division_if(mobile.slow_frames,mobile.total_frames,release,equals,${secondaryRelease})`]: t( 'The number of slow frames divided by total frames (%s)', SECONDARY_RELEASE_ALIAS ), - [`division_if(mobile.frozen_frames,mobile.total_frames,release,${primaryRelease})`]: + [`division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${primaryRelease})`]: t( 'The number of frozen frames divided by total frames (%s)', PRIMARY_RELEASE_ALIAS ), - [`division_if(mobile.frozen_frames,mobile.total_frames,release,${secondaryRelease})`]: + [`division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${secondaryRelease})`]: t( 'The number of frozen frames divided by total frames (%s)', SECONDARY_RELEASE_ALIAS @@ -211,12 +207,12 @@ export function SpanOperationTable({ columnOrder={[ String(SPAN_OP), String(SPAN_DESCRIPTION), - `division_if(mobile.slow_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.slow_frames,mobile.total_frames,release,${secondaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${primaryRelease})`, - `division_if(mobile.frozen_frames,mobile.total_frames,release,${secondaryRelease})`, - `avg_if(mobile.frames_delay,release,${primaryRelease})`, - `avg_if(mobile.frames_delay,release,${secondaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.slow_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${primaryRelease})`, + `division_if(mobile.frozen_frames,mobile.total_frames,release,equals,${secondaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${primaryRelease})`, + `avg_if(mobile.frames_delay,release,equals,${secondaryRelease})`, `avg_compare(mobile.frames_delay,release,${primaryRelease},${secondaryRelease})`, ]} defaultSort={[ diff --git a/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx b/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx index 428e560561f7eb..b3dbb986361603 100644 --- a/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx +++ b/static/app/views/insights/pages/frontend/frontendOverviewPage.tsx @@ -223,14 +223,14 @@ function EAPOverviewPage() { 'transaction', 'project', 'tpm()', - 'p50_if(span.duration,is_transaction,true)', - 'p95_if(span.duration,is_transaction,true)', - 'failure_rate_if(is_transaction,true)', + 'p50_if(span.duration,is_transaction,equals,true)', + 'p95_if(span.duration,is_transaction,equals,true)', + 'failure_rate_if(is_transaction,equals,true)', ...(displayPerfScore ? (['performance_score(measurements.score.total)'] as const) : []), 'count_unique(user)', - 'sum_if(span.duration,is_transaction,true)', + 'sum_if(span.duration,is_transaction,equals,true)', ], }, 'api.performance.landing-table' diff --git a/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx b/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx index d90dfa5b47bb18..fc09c652dd250c 100644 --- a/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx +++ b/static/app/views/insights/pages/frontend/frontendOverviewTable.tsx @@ -31,11 +31,11 @@ type Row = Pick< | 'transaction' | 'project' | 'tpm()' - | 'p50_if(span.duration,is_transaction,true)' - | 'p95_if(span.duration,is_transaction,true)' - | 'failure_rate_if(is_transaction,true)' + | 'p50_if(span.duration,is_transaction,equals,true)' + | 'p95_if(span.duration,is_transaction,equals,true)' + | 'failure_rate_if(is_transaction,equals,true)' | 'count_unique(user)' - | 'sum_if(span.duration,is_transaction,true)' + | 'sum_if(span.duration,is_transaction,equals,true)' | 'performance_score(measurements.score.total)' >; @@ -44,11 +44,11 @@ type Column = GridColumnHeader< | 'transaction' | 'project' | 'tpm()' - | 'p50_if(span.duration,is_transaction,true)' - | 'p95_if(span.duration,is_transaction,true)' - | 'failure_rate_if(is_transaction,true)' + | 'p50_if(span.duration,is_transaction,equals,true)' + | 'p95_if(span.duration,is_transaction,equals,true)' + | 'failure_rate_if(is_transaction,equals,true)' | 'count_unique(user)' - | 'sum_if(span.duration,is_transaction,true)' + | 'sum_if(span.duration,is_transaction,equals,true)' | 'performance_score(measurements.score.total)' >; @@ -69,17 +69,17 @@ const COLUMN_ORDER: Column[] = [ width: COL_WIDTH_UNDEFINED, }, { - key: `p50_if(span.duration,is_transaction,true)`, + key: `p50_if(span.duration,is_transaction,equals,true)`, name: t('p50()'), width: COL_WIDTH_UNDEFINED, }, { - key: `p95_if(span.duration,is_transaction,true)`, + key: `p95_if(span.duration,is_transaction,equals,true)`, name: t('p95()'), width: COL_WIDTH_UNDEFINED, }, { - key: 'failure_rate_if(is_transaction,true)', + key: 'failure_rate_if(is_transaction,equals,true)', name: t('Failure Rate'), width: COL_WIDTH_UNDEFINED, }, @@ -89,7 +89,7 @@ const COLUMN_ORDER: Column[] = [ width: COL_WIDTH_UNDEFINED, }, { - key: 'sum_if(span.duration,is_transaction,true)', + key: 'sum_if(span.duration,is_transaction,equals,true)', name: DataTitles.timeSpent, width: COL_WIDTH_UNDEFINED, tooltip: SPAN_HEADER_TOOLTIPS.timeSpent, @@ -107,11 +107,11 @@ const SORTABLE_FIELDS = [ 'transaction', 'project', 'tpm()', - 'p50_if(span.duration,is_transaction,true)', - 'p95_if(span.duration,is_transaction,true)', - 'failure_rate_if(is_transaction,true)', + 'p50_if(span.duration,is_transaction,equals,true)', + 'p95_if(span.duration,is_transaction,equals,true)', + 'failure_rate_if(is_transaction,equals,true)', 'count_unique(user)', - 'sum_if(span.duration,is_transaction,true)', + 'sum_if(span.duration,is_transaction,equals,true)', 'performance_score(measurements.score.total)', ] as const; diff --git a/static/app/views/insights/pages/frontend/settings.ts b/static/app/views/insights/pages/frontend/settings.ts index cd73ba0cf3b61d..47c225fb0f67f2 100644 --- a/static/app/views/insights/pages/frontend/settings.ts +++ b/static/app/views/insights/pages/frontend/settings.ts @@ -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 SpanProperty, + field: 'sum_if(span.duration,is_transaction,equals,true)' satisfies SpanProperty, kind: 'desc', }; diff --git a/static/app/views/insights/pages/platform/laravel/jobsTable.tsx b/static/app/views/insights/pages/platform/laravel/jobsTable.tsx index 7be2ce58c22d93..42ecdfcc5f2013 100644 --- a/static/app/views/insights/pages/platform/laravel/jobsTable.tsx +++ b/static/app/views/insights/pages/platform/laravel/jobsTable.tsx @@ -35,7 +35,7 @@ const defaultColumnOrder: Array> = [ width: 164, }, { - key: 'avg_if(span.duration,span.op,queue.process)', + key: 'avg_if(span.duration,span.op,equals,queue.process)', name: t('Avg Processing Time'), width: 184, }, @@ -47,7 +47,7 @@ const rightAlignColumns = new Set([ 'failure_rate()', 'sum(span.duration)', 'avg(messaging.message.receive.latency)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', ]); export function JobsTable() { @@ -60,7 +60,7 @@ export function JobsTable() { 'messaging.destination.name', 'transaction', 'avg(messaging.message.receive.latency)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'failure_rate()', 'sum(span.duration)', ], @@ -104,7 +104,7 @@ export function JobsTable() { /> ); case 'avg(messaging.message.receive.latency)': - case 'avg_if(span.duration,span.op,queue.process)': + case 'avg_if(span.duration,span.op,equals,queue.process)': return ; case 'count()': return ; diff --git a/static/app/views/insights/pages/platform/nextjs/clientTable.tsx b/static/app/views/insights/pages/platform/nextjs/clientTable.tsx index 6dddbbd2adf328..012207406267e1 100644 --- a/static/app/views/insights/pages/platform/nextjs/clientTable.tsx +++ b/static/app/views/insights/pages/platform/nextjs/clientTable.tsx @@ -82,8 +82,8 @@ export function ClientTable() { 'avg(span.duration)', 'p95(span.duration)', 'performance_score(measurements.score.total)', - 'count_if(span.op,navigation)', - 'count_if(span.op,pageload)', + 'count_if(span.op,equals,navigation)', + 'count_if(span.op,equals,pageload)', ], cursorParamName: 'tableCursor', referrer: Referrer.CLIENT_TABLE, @@ -107,7 +107,7 @@ export function ClientTable() { const renderBodyCell = useCallback( (column: GridColumnHeader, dataRow: TableData) => { if (column.key === 'performance_score(measurements.score.total)') { - if (!dataRow['count_if(span.op,pageload)']) { + if (!dataRow['count_if(span.op,equals,pageload)']) { return {' — '}; } return ( diff --git a/static/app/views/insights/queues/components/messageSpanSamplesPanel.spec.tsx b/static/app/views/insights/queues/components/messageSpanSamplesPanel.spec.tsx index 2e3c021f47ae9d..6326dc909f507a 100644 --- a/static/app/views/insights/queues/components/messageSpanSamplesPanel.spec.tsx +++ b/static/app/views/insights/queues/components/messageSpanSamplesPanel.spec.tsx @@ -70,8 +70,8 @@ describe('messageSpanSamplesPanel', () => { 'trace_status_rate(ok)': 0.8, 'count_op(queue.publish)': 222, 'count_op(queue.process)': 333, - 'avg_if(span.duration,span.op,queue.publish)': 3.0, - 'avg_if(span.duration,span.op,queue.process)': 4.0, + 'avg_if(span.duration,span.op,equals,queue.publish)': 3.0, + 'avg_if(span.duration,span.op,equals,queue.process)': 4.0, 'count()': 555, 'avg(messaging.message.receive.latency)': 2.0, 'avg(span.duration)': 3.5, @@ -83,8 +83,8 @@ describe('messageSpanSamplesPanel', () => { 'trace_status_rate(ok)': 'percentage', 'count_op(queue.publish)': 'integer', 'count_op(queue.process)': 'integer', - 'avg_if(span.duration,span.op,queue.publish)': 'duration', - 'avg_if(span.duration,span.op,queue.process)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.publish)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.process)': 'duration', 'count()': 'integer', 'avg(messaging.message.receive.latency)': 'number', 'avg(span.duration)': 'duration', @@ -94,8 +94,8 @@ describe('messageSpanSamplesPanel', () => { 'trace_status_rate(ok)': null, 'count_op(queue.publish)': null, 'count_op(queue.process)': null, - 'avg_if(span.duration,span.op,queue.publish)': 'millisecond', - 'avg_if(span.duration,span.op,queue.process)': 'millisecond', + 'avg_if(span.duration,span.op,equals,queue.publish)': 'millisecond', + 'avg_if(span.duration,span.op,equals,queue.process)': 'millisecond', 'count()': null, 'avg(messaging.message.receive.latency)': null, 'avg(span.duration)': 'millisecond', @@ -184,8 +184,8 @@ describe('messageSpanSamplesPanel', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], @@ -296,8 +296,8 @@ describe('messageSpanSamplesPanel', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], diff --git a/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx b/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx index 37e3be15755eee..2ba848b66a4cfd 100644 --- a/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx +++ b/static/app/views/insights/queues/components/messageSpanSamplesPanel.tsx @@ -427,7 +427,7 @@ function ConsumerMetricsRibbon({ /> diff --git a/static/app/views/insights/queues/components/tables/queuesTable.spec.tsx b/static/app/views/insights/queues/components/tables/queuesTable.spec.tsx index da4053c1251a90..a93fa3d9072a9c 100644 --- a/static/app/views/insights/queues/components/tables/queuesTable.spec.tsx +++ b/static/app/views/insights/queues/components/tables/queuesTable.spec.tsx @@ -28,8 +28,8 @@ describe('queuesTable', () => { 'count_op(queue.process)': 2, 'sum(span.duration)': 6, 'avg(span.duration)': 3, - 'avg_if(span.duration,span.op,queue.publish)': 0, - 'avg_if(span.duration,span.op,queue.process)': 3, + 'avg_if(span.duration,span.op,equals,queue.publish)': 0, + 'avg_if(span.duration,span.op,equals,queue.process)': 3, 'avg(messaging.message.receive.latency)': 20, 'trace_status_rate(ok)': 0.8, }, @@ -41,8 +41,8 @@ describe('queuesTable', () => { 'count_op(queue.process)': 'integer', 'sum(span.duration)': 'duration', 'avg(span.duration)': 'duration', - 'avg_if(span.duration,span.op,queue.publish)': 'duration', - 'avg_if(span.duration,span.op,queue.process)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.publish)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.process)': 'duration', 'avg(messaging.message.receive.latency)': 'duration', 'trace_status_rate(ok)': 'percentage', }, @@ -77,8 +77,8 @@ describe('queuesTable', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], @@ -113,8 +113,8 @@ describe('queuesTable', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], diff --git a/static/app/views/insights/queues/components/tables/queuesTable.tsx b/static/app/views/insights/queues/components/tables/queuesTable.tsx index 6572aeaf4247ef..8e59e01ea79161 100644 --- a/static/app/views/insights/queues/components/tables/queuesTable.tsx +++ b/static/app/views/insights/queues/components/tables/queuesTable.tsx @@ -34,7 +34,7 @@ type Row = Pick< | 'sum(span.duration)' | 'messaging.destination.name' | 'avg(messaging.message.receive.latency)' - | `avg_if(${string},${string},${string})` + | `avg_if(${string},${string},${string},${string})` | `count_op(${string})` >; @@ -52,7 +52,7 @@ const COLUMN_ORDER: Column[] = [ width: COL_WIDTH_UNDEFINED, }, { - key: 'avg_if(span.duration,span.op,queue.process)', + key: 'avg_if(span.duration,span.op,equals,queue.process)', name: t('Avg Processing Time'), width: COL_WIDTH_UNDEFINED, }, @@ -82,7 +82,7 @@ const SORTABLE_FIELDS = [ SpanFields.MESSAGING_MESSAGE_DESTINATION_NAME, 'count_op(queue.publish)', 'count_op(queue.process)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', `sum(span.duration)`, 'trace_status_rate(ok)', diff --git a/static/app/views/insights/queues/components/tables/transactionsTable.spec.tsx b/static/app/views/insights/queues/components/tables/transactionsTable.spec.tsx index cb0492c31c1957..f1dea3304c6c8a 100644 --- a/static/app/views/insights/queues/components/tables/transactionsTable.spec.tsx +++ b/static/app/views/insights/queues/components/tables/transactionsTable.spec.tsx @@ -42,8 +42,8 @@ describe('transactionsTable', () => { 'count_op(queue.process)': 2, 'sum(span.duration)': 6, 'avg(span.duration)': 3, - 'avg_if(span.duration,span.op,queue.publish)': 0, - 'avg_if(span.duration,span.op,queue.process)': 3, + 'avg_if(span.duration,span.op,equals,queue.publish)': 0, + 'avg_if(span.duration,span.op,equals,queue.process)': 3, 'avg(messaging.message.receive.latency)': 20, 'trace_status_rate(ok)': 0.8, }, @@ -55,8 +55,8 @@ describe('transactionsTable', () => { 'count_op(queue.process)': 'integer', 'sum(span.duration)': 'duration', 'avg(span.duration)': 'duration', - 'avg_if(span.duration,span.op,queue.publish)': 'duration', - 'avg_if(span.duration,span.op,queue.process)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.publish)': 'duration', + 'avg_if(span.duration,span.op,equals,queue.process)': 'duration', 'avg(messaging.message.receive.latency)': 'duration', 'trace_status_rate(ok)': 'percentage', }, @@ -93,8 +93,8 @@ describe('transactionsTable', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], @@ -119,7 +119,7 @@ describe('transactionsTable', () => { statsPeriod: '10d', project: '1', [QueryParameterNames.DESTINATIONS_SORT]: - '-avg_if(span.duration,span.op,queue.process)', + '-avg_if(span.duration,span.op,equals,queue.process)', }, hash: '', state: undefined, @@ -141,13 +141,13 @@ describe('transactionsTable', () => { 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], dataset: 'spans', - sort: '-avg_if(span.duration,span.op,queue.process)', + sort: '-avg_if(span.duration,span.op,equals,queue.process)', }), }) ); diff --git a/static/app/views/insights/queues/components/tables/transactionsTable.tsx b/static/app/views/insights/queues/components/tables/transactionsTable.tsx index 654d04ba8b95a8..d4037109d7b558 100644 --- a/static/app/views/insights/queues/components/tables/transactionsTable.tsx +++ b/static/app/views/insights/queues/components/tables/transactionsTable.tsx @@ -32,7 +32,7 @@ type Row = Pick< SpanResponse, | 'sum(span.duration)' | 'transaction' - | `avg_if(${string},${string},${string})` + | `avg_if(${string},${string},${string},${string})` | `count_op(${string})` >; @@ -55,7 +55,7 @@ const COLUMN_ORDER: Column[] = [ width: COL_WIDTH_UNDEFINED, }, { - key: 'avg_if(span.duration,span.op,queue.process)', + key: 'avg_if(span.duration,span.op,equals,queue.process)', name: t('Avg Processing Time'), width: COL_WIDTH_UNDEFINED, }, @@ -85,7 +85,7 @@ const SORTABLE_FIELDS = [ 'transaction', 'count_op(queue.publish)', 'count_op(queue.process)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', `sum(span.duration)`, 'trace_status_rate(ok)', @@ -187,7 +187,7 @@ function renderBodyCell( [ 'count_op(queue.process)', 'avg(messaging.message.receive.latency)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.process)', ].includes(key)) ) { return ( diff --git a/static/app/views/insights/queues/queries/useQueuesByDestinationQuery.tsx b/static/app/views/insights/queues/queries/useQueuesByDestinationQuery.tsx index 34dd6e1a74551b..5760539ac1c2fb 100644 --- a/static/app/views/insights/queues/queries/useQueuesByDestinationQuery.tsx +++ b/static/app/views/insights/queues/queries/useQueuesByDestinationQuery.tsx @@ -40,8 +40,8 @@ export function useQueuesByDestinationQuery({ 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], diff --git a/static/app/views/insights/queues/queries/useQueuesByTransactionQuery.tsx b/static/app/views/insights/queues/queries/useQueuesByTransactionQuery.tsx index f131afe0105499..9788eb9c2bd732 100644 --- a/static/app/views/insights/queues/queries/useQueuesByTransactionQuery.tsx +++ b/static/app/views/insights/queues/queries/useQueuesByTransactionQuery.tsx @@ -42,8 +42,8 @@ export function useQueuesByTransactionQuery({ 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], diff --git a/static/app/views/insights/queues/queries/useQueuesMetricsQuery.tsx b/static/app/views/insights/queues/queries/useQueuesMetricsQuery.tsx index f60b84ab1e9cbb..69d9c267c4655b 100644 --- a/static/app/views/insights/queues/queries/useQueuesMetricsQuery.tsx +++ b/static/app/views/insights/queues/queries/useQueuesMetricsQuery.tsx @@ -33,8 +33,8 @@ export function useQueuesMetricsQuery({ 'count_op(queue.process)', 'sum(span.duration)', 'avg(span.duration)', - 'avg_if(span.duration,span.op,queue.publish)', - 'avg_if(span.duration,span.op,queue.process)', + 'avg_if(span.duration,span.op,equals,queue.publish)', + 'avg_if(span.duration,span.op,equals,queue.process)', 'avg(messaging.message.receive.latency)', 'trace_status_rate(ok)', ], diff --git a/static/app/views/insights/queues/views/destinationSummaryPage.tsx b/static/app/views/insights/queues/views/destinationSummaryPage.tsx index c793b852c9cf4b..4c140166464ad3 100644 --- a/static/app/views/insights/queues/views/destinationSummaryPage.tsx +++ b/static/app/views/insights/queues/views/destinationSummaryPage.tsx @@ -92,7 +92,9 @@ function DestinationSummaryPage() { /> diff --git a/static/app/views/insights/types.tsx b/static/app/views/insights/types.tsx index cc78aeab231c12..5b6b16b5fa4755 100644 --- a/static/app/views/insights/types.tsx +++ b/static/app/views/insights/types.tsx @@ -498,7 +498,7 @@ type SpanResponseRaw = { } & { [Property in SpanNumberFields as `avg_compare(${Property},${string},${string},${string})`]: number; } & { - [Property in SpanFields as `count_if(${Property},${string})`]: number; + [Property in SpanFields as `count_if(${Property},${'equals' | 'notEquals' | 'lessOrEquals' | 'greaterOrEquals' | 'less' | 'greater'},${string})`]: number; }; export type SpanResponse = Flatten;