Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds backend usage budget controls for organizations and projects, including budget alert settings, project ingest caps, smart throttling calculations, notification work items, and API contract updates.
Changes:
- Adds organization budget alert and project ingest limit models/API fields.
- Extends usage/event processing with alert checks, project budget allowance, and smart throttling sampling.
- Adds notification messages, work items, mailer methods/templates, OpenSpec docs, OpenAPI baseline updates, and limited regression tests.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Exceptionless.Tests/Services/UsageServiceTests.cs | Adds a regression test for missing organization smart throttle handling. |
| tests/Exceptionless.Tests/Mail/NullMailer.cs | Adds no-op implementations for new mailer methods. |
| tests/Exceptionless.Tests/Mail/CountingMailer.cs | Adds stub implementations for new mailer methods. |
| tests/Exceptionless.Tests/Controllers/OrganizationControllerTests.cs | Adds PATCH regression coverage for budget alert settings without name. |
| tests/Exceptionless.Tests/Controllers/Data/openapi.json | Updates OpenAPI baseline for new usage budget fields and DTOs. |
| src/Exceptionless.Web/Models/Project/ViewProject.cs | Exposes project ingest limit and smart throttle state. |
| src/Exceptionless.Web/Models/Project/UpdateProject.cs | Allows project ingest limit updates. |
| src/Exceptionless.Web/Models/Organization/ViewOrganization.cs | Exposes organization budget alert settings. |
| src/Exceptionless.Web/Models/Organization/UpdateOrganization.cs | Adds organization PATCH DTO. |
| src/Exceptionless.Web/Mapping/ProjectMapper.cs | Ignores computed project usage budget fields in mapper. |
| src/Exceptionless.Web/Mapping/OrganizationMapper.cs | Adds organization update mapping. |
| src/Exceptionless.Web/Controllers/ProjectController.cs | Populates computed project ingest/throttle fields. |
| src/Exceptionless.Web/Controllers/OrganizationController.cs | Switches update DTO and adjusts name validation condition. |
| src/Exceptionless.Web/Bootstrapper.cs | Registers new startup notification subscribers. |
| src/Exceptionless.Core/Services/UsageService.cs | Adds budget alert checks, project allowance calculation, and smart throttle calculation. |
| src/Exceptionless.Core/Models/WorkItems/ProjectSmartThrottleWorkItem.cs | Adds smart throttle notification work item. |
| src/Exceptionless.Core/Models/WorkItems/OrganizationBudgetAlertWorkItem.cs | Adds budget alert notification work item. |
| src/Exceptionless.Core/Models/ProjectIngestLimit.cs | Adds project ingest limit model and enum. |
| src/Exceptionless.Core/Models/Project.cs | Persists optional project ingest limit. |
| src/Exceptionless.Core/Models/OrganizationBudgetAlertSettings.cs | Adds organization budget alert settings model. |
| src/Exceptionless.Core/Models/Organization.cs | Persists and validates organization budget alert settings. |
| src/Exceptionless.Core/Models/Messaging/ProjectSmartThrottleApplied.cs | Adds smart throttle notification message. |
| src/Exceptionless.Core/Models/Messaging/OrganizationBudgetAlert.cs | Adds budget alert notification message. |
| src/Exceptionless.Core/Mail/Templates/project-smart-throttle.html | Adds smart throttle email template. |
| src/Exceptionless.Core/Mail/Templates/organization-budget-alert.html | Adds budget alert email template. |
| src/Exceptionless.Core/Mail/Mailer.cs | Implements new budget/throttle emails. |
| src/Exceptionless.Core/Mail/IMailer.cs | Adds new budget/throttle mailer contracts. |
| src/Exceptionless.Core/Jobs/WorkItemHandlers/ProjectSmartThrottleWorkItemHandler.cs | Adds smart throttle subscriber and email handler. |
| src/Exceptionless.Core/Jobs/WorkItemHandlers/OrganizationBudgetAlertWorkItemHandler.cs | Adds budget alert subscriber and email handler. |
| src/Exceptionless.Core/Jobs/EventPostsJob.cs | Enforces project allowance and applies smart throttle sampling. |
| src/Exceptionless.Core/Exceptionless.Core.csproj | Embeds new email templates. |
| src/Exceptionless.Core/Bootstrapper.cs | Registers new work item handlers. |
| openspec/changes/add-usage-budget-controls/tasks.md | Adds implementation/verification task plan. |
| openspec/changes/add-usage-budget-controls/specs/organizations-projects-users-auth/spec.md | Adds auth/ownership requirements. |
| openspec/changes/add-usage-budget-controls/specs/jobs-notifications-and-queues/spec.md | Adds notification and queue requirements. |
| openspec/changes/add-usage-budget-controls/specs/event-ingestion/spec.md | Adds ingestion, throttling, and project budget requirements. |
| openspec/changes/add-usage-budget-controls/specs/api-compatibility/spec.md | Adds API compatibility requirements. |
| openspec/changes/add-usage-budget-controls/proposal.md | Documents proposal and user-visible behavior. |
| openspec/changes/add-usage-budget-controls/design.md | Documents detailed backend/UI design. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
Completed the final reviewer-feedback, thermo-nuclear, and runtime dogfood pass on
No external blocker remains. |
niemyjski
force-pushed
the
niemyjski/add-usage-budget-controls
branch
from
September 16, 2026 01:03
bea9811 to
2fda0f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add organization budget alerts, optional project event caps, and automatic sampling for noisy projects. The Svelte usage pages let users configure, save, and clear these settings and show current throttling state.
Validation
Hosted Build workflow passed on
2fda0f424: 3,048 backend tests passed and 3 were skipped; E2E reported 66 passed plus one existing dashboard chart-refresh test that passed on retry. Frontend and Docker checks also passed.Local service-backed integration tests and
OpenApiSnapshotTestswere not rerun because the shared Elasticsearch cluster has unavailable primary shards; the hosted backend run supplied that integration coverage.Compatibility and operation
Missing budget settings keep alerts disabled and project caps unset. Atomic reservations require a single Redis endpoint; Redis Cluster is rejected. Retry dispatch remains at least once: an enqueue that succeeds before its acknowledgement fails may duplicate the failed event, while processed events from the original batch remain completed.