Skip to content

feat(weekly-reports): Add data layer for Total Issues graph#119154

Open
amy-chen23 wants to merge 5 commits into
masterfrom
amyc/total-issues
Open

feat(weekly-reports): Add data layer for Total Issues graph#119154
amy-chen23 wants to merge 5 commits into
masterfrom
amyc/total-issues

Conversation

@amy-chen23

@amy-chen23 amy-chen23 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Addresses data layer of ID-1669

Goal: Add Total Issues graph alongside existing Total Errors graph. We want to remove "Total Project Transactions" entirely --> we'll do this in a separate PR though

Changes

  • Add issue_count_by_day and prev_week_total_substatus_count to ProjectContext for per-project daily issue counts and WoW comparison
  • Add organization_project_issue_counts_by_day(start, end, ctx) query using TruncDay("last_seen") on unresolved groups --> TruncDay follows UTC, so it still matches Snuba time windows for total error counts too
  • Cache issue counts ("i" key) alongside errors/transactions for WoW
  • Rename _append_project_event_counts_previous_week_append_previous_week_counts to reflect broader scope
  • Extend trends() to include issue_count in series and substatus counts in legend for this chart
image

TODO:

  • Rendering PR (next) will use this data to display the chart and updated table

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 7, 2026
@amy-chen23 amy-chen23 changed the title feat(weekly-reports): Add data layer for Total Issues chart feat(weekly-reports): Add data layer for Total Issues graph Jul 7, 2026
@amy-chen23

amy-chen23 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@sentry review

@amy-chen23

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a6e037e. Configure here.

@amy-chen23 amy-chen23 marked this pull request as ready for review July 7, 2026 21:39
@amy-chen23 amy-chen23 requested review from a team as code owners July 7, 2026 21:39
Comment thread src/sentry/tasks/summaries/organization_report_context_factory.py Outdated
Comment thread src/sentry/tasks/summaries/weekly_reports.py
Comment thread src/sentry/tasks/summaries/weekly_reports.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f50ca9b. Configure here.

Comment thread src/sentry/tasks/summaries/organization_report_context_factory.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant