{{OrganizationName}} has used {{Threshold}}% of its monthly event allowance ({{CurrentEventCount}} of {{EventLimit}} events). You have {{RemainingEventCount}} events remaining this billing period. Consider upgrading your plan or adjusting your event volume to avoid service interruption. You can also view the most frequent events to see which events are counting against your plan limits. | |
|---|
|
|---|
|
|
diff --git a/src/Exceptionless.Core/Mail/Templates/project-smart-throttle.html b/src/Exceptionless.Core/Mail/Templates/project-smart-throttle.html
new file mode 100644
index 0000000000..618deb72da
--- /dev/null
+++ b/src/Exceptionless.Core/Mail/Templates/project-smart-throttle.html
@@ -0,0 +1 @@
+Smart throttling has been activated for {{ProjectName}} in {{OrganizationName}}. Your organization has used {{CurrentEventCount}} of {{EventLimit}} events this billing period. To protect your remaining budget, events from this project are now being sampled at {{SamplePercent}}%. This means approximately {{SamplePercent}}% of incoming events will be accepted while the rest are discarded. Throttling will automatically adjust as your usage changes. To stop throttling, you can upgrade your plan or reduce event volume. You can also view the most frequent events to see which events are counting against your plan limits. | |
|---|
|
|---|
|
|
diff --git a/src/Exceptionless.Core/Models/Messaging/OrganizationBudgetAlert.cs b/src/Exceptionless.Core/Models/Messaging/OrganizationBudgetAlert.cs
new file mode 100644
index 0000000000..1d6bf4219b
--- /dev/null
+++ b/src/Exceptionless.Core/Models/Messaging/OrganizationBudgetAlert.cs
@@ -0,0 +1,10 @@
+namespace Exceptionless.Core.Messaging.Models;
+
+public record OrganizationBudgetAlert
+{
+ public required string OrganizationId { get; init; }
+ public required int Threshold { get; init; }
+ public required int ThresholdEventCount { get; init; }
+ public required int CurrentEventCount { get; init; }
+ public required int EventLimit { get; init; }
+}
diff --git a/src/Exceptionless.Core/Models/Messaging/ProjectSmartThrottleApplied.cs b/src/Exceptionless.Core/Models/Messaging/ProjectSmartThrottleApplied.cs
new file mode 100644
index 0000000000..b3e9ca7c2c
--- /dev/null
+++ b/src/Exceptionless.Core/Models/Messaging/ProjectSmartThrottleApplied.cs
@@ -0,0 +1,10 @@
+namespace Exceptionless.Core.Messaging.Models;
+
+public record ProjectSmartThrottleApplied
+{
+ public required string OrganizationId { get; init; }
+ public required string ProjectId { get; init; }
+ public required double SampleRate { get; init; }
+ public required int CurrentEventCount { get; init; }
+ public required int EventLimit { get; init; }
+}
diff --git a/src/Exceptionless.Core/Models/Organization.cs b/src/Exceptionless.Core/Models/Organization.cs
index 27b9e3c937..b7cf6e12ef 100644
--- a/src/Exceptionless.Core/Models/Organization.cs
+++ b/src/Exceptionless.Core/Models/Organization.cs
@@ -171,6 +171,11 @@ public Organization()
///
public DataDictionary? Data { get; set; }
+ ///