rehanvdm / serverless-website-analytics

A CDK construct that consists of a serverless backend, frontend and client side code to track website analytics
GNU General Public License v2.0
167 stars 13 forks source link

fix: MINIMUM_VIEWS not applied during Big Spike detection #90

Closed kc0bfv closed 3 months ago

kc0bfv commented 3 months ago

My recent PR added the MINIMUM_VIEW threshold, per discussion on issue #75, but I believe I missed a spot to apply the logic. I am still getting alerts about Big Spikes that do not cross the MINIMUM_VIEW threshold...

The spike detection in the evaluationWindowState function also compares recent view counts to the breachingThreshold, and if previous analysis didn't create an alarm this one does for "big spike" detection.

Therefore - I think I need to add the MINIMUM_VIEWS logic in the evaluationWindowState function too, to cover the big spike case. I just started testing this on my personal instance.

kc0bfv commented 3 months ago

Sorry about what looks like 1M commits on this one. It's really just that last one :-/

rehanvdm commented 3 months ago

No worries about the multiple other commits, it happens when you merge the main branch on to your branch. If you rebase main onto your branch then you would not see the commits of main on your branch.

Yes, you are right, I also missed that detail when I ran the simulation part in the previous PR.

Thanks

github-actions[bot] commented 3 months ago

:tada: This PR is included in version 1.11.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: