Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly metrics should be keyed to a year #7

Closed
bradmontgomery opened this issue Mar 7, 2013 · 0 comments
Closed

Weekly metrics should be keyed to a year #7

bradmontgomery opened this issue Mar 7, 2013 · 0 comments
Labels

Comments

@bradmontgomery
Copy link
Owner

The weekly metric uses a key that will become inaccurate after a year. For example, let's say we're recording metrics for user-signups.

The key for this metric becomes m:user-signups:w:00 during the first week of the year, then m:user-signups:w:01 for the second week.

Unfortunately, after a full year, the metric will again get recorded in the m:user-signups:w:00 bucket. Year 2 just clobbered year 1's metrics. 👊

💩

fix

Weekly metrics should include the year, since the week is in the range of [0, 52). So, the new weekly metric's key should look something like this::

m:<slug>:w:<yyyy>-<num>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant