Skip to content

Commit 1d825bf

Browse files
committed
Use Count property in favor of Value
1 parent 46971f7 commit 1d825bf

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Source/Shared/Models/Client/Event.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ public Event() {
4242
/// </summary>
4343
public decimal? Value { get; set; }
4444

45+
/// <summary>
46+
/// The number of duplicated events
47+
/// </summary>
48+
public int? Count { get; set; }
49+
4550
/// <summary>
4651
/// Optional data entries that contain additional information about this event.
4752
/// </summary>

Source/Shared/Plugins/Default/1010_DuplicateCheckerPlugin.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ public DuplicateCheckerPlugin(TimeSpan? interval) {
2828
}
2929

3030
public void Run(EventPluginContext context) {
31-
// If Event.Value is set before we hit this plugin, it's being used for something else for a good reason. Don't deduplicate. This also prevents problems with reentrancy
32-
if (context.Event.Value.HasValue)
33-
return;
34-
3531
int hashCode = context.Event.GetHashCode();
3632

3733
// Increment the occurrence count if the event is already queued for submission.
@@ -92,7 +88,7 @@ public void IncrementCount() {
9288
}
9389

9490
public void Enqueue() {
95-
_context.Event.Value = _count;
91+
_context.Event.Count = _count;
9692
_context.Resolver.GetEventQueue().Enqueue(_context.Event);
9793
}
9894
}

0 commit comments

Comments
 (0)