-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issue #67: Backfilled metric - online users #92
Conversation
There are some issues here which I have concerns about. I'll be happy to discuss if you want to. |
3bd7340
to
5c463dd
Compare
Hi Marc. I don't think a meeting is necessary. You have addressed my primary concerns for now. I'm a little iffy about having it controlled from within the database collector, but that's something I'd rather leave to Brendan. Just that one fix causing the CI problem, and then I am OK to merge. Get Brendan to have a look at the UI aspect. Regards |
6b79f67
to
ce4f57e
Compare
Hi @brendanheywood, I have made changes for this PR, a concern that I have is the use of the API for retrieving logs that does not provide a faster / lighter way to retrieve concurrent users (ie: using DISTINCT in a SELECT statement - retrieving all data Regards, Marc |
hi @marcghaly If the log api is too slow then do it directly like it was. But just to be be clear @jaypha was doing / has just done a huge refactor of the way the metrics work and I didn't want to waste your time as it would affect your patch. I suspect you will need to have a look at what has landed and rewrite a lot of it (despite there being no conflicts) We have our standup at 10, so lets chat right after that. Can you please ping me on matrix, I pinged you the other day but you didn't see it and I'm not sure I have the real 'you' in matrix |
bdce8c2
to
458297e
Compare
// Trick to avoid erasing data when it only needs to be completed. | ||
$this->record_metrics($metricitems); | ||
} else { | ||
$this->delete_metrics($metricclass->get_name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused why we'd ever need to delete data? If we are being asked to backfill data from time period which already has data then that smells like what ever is calling record_saved_metrics isn't sending correct times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it confusing seeing different frequencies in the chart - what happens at the moment : it retrieves all data for the requested time-frame unless the frequency changed, when frequency changes, it deletes all data and replaces it with the new data with proper interval. Also, if I request data for 4 months, it will fill data for those 4 months then if I request data for 12 months, it will retrieve data from the lowest timestamp present in DB to the passed point time requested (with the period) - it will only retrieve the missing part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deleting data has some business value but I think it should be explicit, similar to the setting for how much data you want to keep around. I don't like the idea of someone trying to add in more data and ending up losing data they already had.
I've split that off into a new issue, if you want you can tackle that after this pr lands:
#104
For this one I'd just want it to only ever add more data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have set it up so it never deletes data now - but also that if frequency changed it is not overlapping data of another interval - It would get extremely confusing. If frequency changes, timestamp needs to be earlier than lowest one in DB so it completes data, it looks like this. Highlighted the one month period - the other one 1 week.
I will sure get on this one once this PR lands.
The golden rule is imagine that the metric had been running the whole time and we didn't need to back fill. Ideally the end result should be exactly the same. So yes there would be a metric for every time slice and many of them would be 0 |
Also I am using postgress too |
5228228
to
174a1a0
Compare
Hi @brendanheywood, I have made changes according to your comments, If changes are okay I will squash commits. Cheers, Marc |
45f3871
to
abb7ea9
Compare
abb7ea9
to
8f46313
Compare
433f260
to
2d304fe
Compare
0cc66bf
to
1e8cd4f
Compare
1e8cd4f
to
656cad4
Compare
Hi @brendanheywood, this is squashed and rebased over latest master. Regards, Marc |
thanks @marcghaly |
Hi @jaypha, hi @brendanheywood,
This is PR for issue #67.
Regards,
Marc