Browse Source

feat(samples-vs-metrics): Copy changes (#57010)

Closes https://github.com/getsentry/sentry/issues/56818
Closes https://github.com/getsentry/sentry/issues/56821
Closes https://github.com/getsentry/sentry/issues/56824
Closes https://github.com/getsentry/sentry/issues/56825
ArthurKnaus 1 year ago
parent
commit
7b764f330f

+ 1 - 1
static/app/components/discover/transactionsList.tsx

@@ -299,7 +299,7 @@ class _TransactionsList extends Component<Props> {
                 size="xs"
                 data-test-id="transaction-events-open"
               >
-                {t('View All Events')}
+                {t('View Sampled Events')}
               </Button>
             </GuideAnchor>
           ) : (

+ 5 - 5
static/app/utils/discover/eventView.spec.tsx

@@ -564,7 +564,7 @@ describe('EventView.fromNewQueryWithPageFilters()', function () {
 describe('EventView.fromNewQueryWithLocation()', function () {
   const prebuiltQuery: NewQuery = {
     id: undefined,
-    name: 'All Events',
+    name: 'Sampled Events',
     query: '',
     projects: [],
     fields: ['title', 'event.type', 'project', 'user', 'timestamp'],
@@ -583,7 +583,7 @@ describe('EventView.fromNewQueryWithLocation()', function () {
 
     expect(eventView).toMatchObject({
       id: undefined,
-      name: 'All Events',
+      name: 'Sampled Events',
       fields: [
         {field: 'title'},
         {field: 'event.type'},
@@ -616,7 +616,7 @@ describe('EventView.fromNewQueryWithLocation()', function () {
 
     expect(eventView).toMatchObject({
       id: undefined,
-      name: 'All Events',
+      name: 'Sampled Events',
       fields: [
         {field: 'title'},
         {field: 'event.type'},
@@ -655,7 +655,7 @@ describe('EventView.fromNewQueryWithLocation()', function () {
 
     expect(eventView).toMatchObject({
       id: undefined,
-      name: 'All Events',
+      name: 'Sampled Events',
       fields: [
         {field: 'title'},
         {field: 'event.type'},
@@ -696,7 +696,7 @@ describe('EventView.fromNewQueryWithLocation()', function () {
 
     expect(eventView2).toMatchObject({
       id: undefined,
-      name: 'All Events',
+      name: 'Sampled Events',
       fields: [
         {field: 'title'},
         {field: 'event.type'},

+ 1 - 1
static/app/views/alerts/rules/metric/ruleForm.spec.tsx

@@ -230,7 +230,7 @@ describe('Incident Rules Form', () => {
 
       await waitFor(() =>
         expect(screen.getByTestId('alert-total-events')).toHaveTextContent(
-          'Total Events5'
+          'Total Transactions5'
         )
       );
 

+ 7 - 5
static/app/views/alerts/rules/metric/triggers/chart/index.tsx

@@ -294,6 +294,12 @@ class TriggersChart extends PureComponent<Props, State> {
     const isExtrapolatedChartData =
       seriesAdditionalInfo?.[timeseriesData[0]?.seriesName]?.isExtrapolatedData;
 
+    const totalCountLabel = isSessionAggregate(aggregate)
+      ? SESSION_AGGREGATE_TO_HEADING[aggregate]
+      : isExtrapolatedChartData
+      ? t('Estimated Transactions')
+      : t('Total Transactions');
+
     return (
       <Fragment>
         {header}
@@ -327,11 +333,7 @@ class TriggersChart extends PureComponent<Props, State> {
 
         <ChartControls>
           <InlineContainer data-test-id="alert-total-events">
-            <SectionHeading>
-              {isSessionAggregate(aggregate)
-                ? SESSION_AGGREGATE_TO_HEADING[aggregate]
-                : t('Total Events')}
-            </SectionHeading>
+            <SectionHeading>{totalCountLabel}</SectionHeading>
             <SectionValue>
               {totalCount !== null ? totalCount.toLocaleString() : '\u2014'}
             </SectionValue>

+ 1 - 1
static/app/views/discover/chartFooter.tsx

@@ -42,7 +42,7 @@ export default function ChartFooter({
 }: Props) {
   const elements: React.ReactNode[] = [];
 
-  elements.push(<SectionHeading key="total-label">{t('Event Count')}</SectionHeading>);
+  elements.push(<SectionHeading key="total-label">{t('Sample Count')}</SectionHeading>);
   elements.push(
     total === null ? (
       <SectionValue data-test-id="loading-placeholder" key="total-value">

+ 2 - 2
static/app/views/issueDetails/header.spec.tsx

@@ -65,7 +65,7 @@ describe('groupDetails', () => {
       await userEvent.click(screen.getByRole('tab', {name: /tags/i}));
       expect(browserHistory.push).toHaveBeenCalledWith('BASE_URL/tags/');
 
-      await userEvent.click(screen.getByRole('tab', {name: /all events/i}));
+      await userEvent.click(screen.getByRole('tab', {name: /sampled events/i}));
       expect(browserHistory.push).toHaveBeenCalledWith({
         pathname: 'BASE_URL/events/',
         query: {},
@@ -168,7 +168,7 @@ describe('groupDetails', () => {
       await userEvent.click(screen.getByRole('tab', {name: /tags/i}));
       expect(browserHistory.push).toHaveBeenCalledWith('BASE_URL/tags/');
 
-      await userEvent.click(screen.getByRole('tab', {name: /all events/i}));
+      await userEvent.click(screen.getByRole('tab', {name: /sampled events/i}));
       expect(browserHistory.push).toHaveBeenCalledWith({
         pathname: 'BASE_URL/events/',
         query: {},

+ 1 - 1
static/app/views/issueDetails/header.tsx

@@ -127,7 +127,7 @@ function GroupHeaderTabs({
         disabled={disabledTabs.includes(Tab.EVENTS)}
         to={eventRoute}
       >
-        {t('All Events')}
+        {t('Sampled Events')}
       </TabList.Item>
       <TabList.Item
         key={Tab.MERGED}

+ 1 - 1
static/app/views/performance/transactionEvents.spec.tsx

@@ -176,7 +176,7 @@ describe('Performance > TransactionSummary', function () {
     expect(screen.getByRole('table')).toBeInTheDocument();
 
     expect(screen.getByRole('tab', {name: 'Overview'})).toBeInTheDocument();
-    expect(screen.getByRole('tab', {name: 'All Events'})).toBeInTheDocument();
+    expect(screen.getByRole('tab', {name: 'Sampled Events'})).toBeInTheDocument();
     expect(screen.getByRole('tab', {name: 'Tags'})).toBeInTheDocument();
 
     ProjectsStore.reset();

+ 1 - 1
static/app/views/performance/transactionSummary/header.tsx

@@ -195,7 +195,7 @@ function TransactionHeader({
               }}
             >
               <TabList.Item key={Tab.TRANSACTION_SUMMARY}>{t('Overview')}</TabList.Item>
-              <TabList.Item key={Tab.EVENTS}>{t('All Events')}</TabList.Item>
+              <TabList.Item key={Tab.EVENTS}>{t('Sampled Events')}</TabList.Item>
               <TabList.Item key={Tab.TAGS}>{t('Tags')}</TabList.Item>
               <TabList.Item key={Tab.SPANS}>{t('Spans')}</TabList.Item>
               <TabList.Item

+ 1 - 1
static/app/views/performance/transactionSummary/transactionVitals/vitalCard.tsx

@@ -226,7 +226,7 @@ class VitalCard extends Component<Props, State> {
               })}
             onClick={this.trackOpenAllEventsClicked}
           >
-            {t('View All Events')}
+            {t('View Sampled Events')}
           </Button>
         </div>
       </CardSummary>