Skip to content

Commit

Permalink
fix(project-details): Use correct dataset for 'Number of Errors' chart
Browse files Browse the repository at this point in the history
  • Loading branch information
malwilley committed Nov 11, 2024
1 parent c3b32a7 commit 40169fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions static/app/views/projectDetail/charts/projectBaseEventsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ type Props = Omit<
};

class ProjectBaseEventsChart extends Component<Props> {
defaultProps = {
dataset: DiscoverDatasets.METRICS_ENHANCED,
};

componentDidMount() {
this.fetchTotalCount();
}
Expand All @@ -39,14 +43,15 @@ class ProjectBaseEventsChart extends Component<Props> {
}

async fetchTotalCount() {
const {api, organization, selection, onTotalValuesChange, query} = this.props;
const {api, organization, selection, onTotalValuesChange, query, dataset} =
this.props;
const {projects, environments, datetime} = selection;

try {
const totals = await fetchTotalCount(api, organization.slug, {
field: [],
query,
dataset: DiscoverDatasets.METRICS_ENHANCED,
dataset,
environment: environments,
project: projects.map(proj => String(proj)),
...normalizeDateTimeParams(datetime),
Expand All @@ -69,6 +74,7 @@ class ProjectBaseEventsChart extends Component<Props> {
field,
title,
help,
dataset,
...eventsChartProps
} = this.props;
const {projects, environments, datetime} = selection;
Expand All @@ -85,7 +91,7 @@ class ProjectBaseEventsChart extends Component<Props> {
query={query}
api={api}
projects={projects}
dataset={DiscoverDatasets.METRICS_ENHANCED}
dataset={dataset}
environments={environments}
start={start}
end={end}
Expand Down
2 changes: 2 additions & 0 deletions static/app/views/projectDetail/projectCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import type {Project} from 'sentry/types/project';
import {defined} from 'sentry/utils';
import {trackAnalytics} from 'sentry/utils/analytics';
import {browserHistory} from 'sentry/utils/browserHistory';
import {DiscoverDatasets} from 'sentry/utils/discover/types';
import {decodeScalar} from 'sentry/utils/queryString';
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
import withApi from 'sentry/utils/withApi';
Expand Down Expand Up @@ -406,6 +407,7 @@ class ProjectCharts extends Component<Props, State> {
interval={this.barChartInterval}
chartComponent={BarChart}
disableReleases
dataset={DiscoverDatasets.ERRORS}
/>
) : (
<ProjectErrorsBasicChart
Expand Down

0 comments on commit 40169fc

Please sign in to comment.