These are chat archives for gdg-x/hub

18th
May 2015
Nitya Narasimhan
@nitya
May 18 2015 02:20
So I dug into the gdg-x hub codebase (in particular lib/controllers/api/v1/metrics.js, lib/controllers/api/utils.js and lib/utils.js) and found the code that pertains to the API endpoint I asked about above. Based on my reading of controller, this basically queries the DailyMetrics model (given the parameters), and based on my reading of the DailyMetrics model, the :year and :month are integers for that year/month (using moment). Which leaves :subject and :metric. On looking at the /metric/types API - I did figure out that subject maps to subjectTypes listed, and metric maps to the “_id” values listed for ‘daily’ metrics.
So far so good. Turns out this metrics call pretty much sums up what GDG Pulse (on directory) provides — which is awesome (and exactly what I wanted).
Two issues: (a) Making calls to this API returns “Not Found” for various parameters tried. Which means my request was formed correctly but there was no matching data in the DB (I tried https://hub.gdgx.io/api/v1/metrics/daily/Chapter/plusOneCount/2014/01 for example to get all plusOneCount metrics for subject=Chapter for Jan 2014.
And (b) it was unclear why the “eventCount” metric did not support “Chapter” as a subjectType (while every other metric did).
Nitya Narasimhan
@nitya
May 18 2015 02:25
Regardless, based on my spelunking, I think its possible that the DailyMetrics collection in your DB is either empty or incomplete. I can’t access that MongoDB instance directly (duh!) but if one of you could perhaps give me an example of ONE valid record in the DailyMetrics collection, I would be much obliged. It will let me verify the API endpoint works by checking if it can retrieve that.
Alternatively just let me know if DailyMetrics is actually empty.
Michael Prentice
@Splaktar
May 18 2015 03:46
your query looks good
Nitya Narasimhan
@nitya
May 18 2015 03:47
@Splaktar Ah. Thanks! Good to know. So does this mean there is no data for DailyMetrics at present? (I keep getting Not Found)
Michael Prentice
@Splaktar
May 18 2015 03:47
I tried to check the logs for more information, but it appears that we have no logging happening on the server
Nitya Narasimhan
@nitya
May 18 2015 03:47
@Splaktar ah. in that case no worries. I’ll come talk to you at the Summit. You guys have more important things to deal with now :-)
Michael Prentice
@Splaktar
May 18 2015 03:49
I’m not able to run any metrics queries and get data back
Nitya Narasimhan
@nitya
May 18 2015 03:51
@Splaktar I think that may actually be the case (that the DailyMetrics ingest is not complete). No matter — its not urgent. Wanted to use this to built a region-level dashboard so we could track metrics for our region. But can check with you later. Thanks for feedback! Appreciated.
Michael Prentice
@Splaktar
May 18 2015 03:52
yeah, it may just not be working atm. let me check the DB I have locally, i just did a full ingest the other day
Nitya Narasimhan
@nitya
May 18 2015 03:52
Oh. Cool! Okay. Let me know.
Michael Prentice
@Splaktar
May 18 2015 03:58
my dailymetrics db is totally empty and monthlymetrics has data with monthly keys, but all of the values are 0
Nitya Narasimhan
@nitya
May 18 2015 03:59
@Splaktar aha. Thank you — you saved me a lot of grief. Okay. So there just wasn’t data yet. I can live with that. Thanks very much!
Michael Prentice
@Splaktar
May 18 2015 04:03
yeah, hopefully we can get things moving again with the Hub soon, but atm there is a bit of a void there. I’m learning it, but it’s easier for me to make progress on Firefly and Boomerang (even Frisbee) atm
If it was hosted in App Engine Java and not using the MEAN stack on an OpenShift instance, it would be a lot easier for me to debug :)
Nitya Narasimhan
@nitya
May 18 2015 04:08
yes perhaps post Summit and I/O there could be interest in revisiting this. Ha ha — I like MEAN myself but needed a reason to revisit Angular (esp. with 2.0 coming) so will educate myself with Hub code exploration in the meantime. I’ve been more Meteor friendly recently so am doing a quick set of meteor packages around gdgx apis to build something
Michael Prentice
@Splaktar
May 18 2015 04:10
Yeah, I’m solid in AngularJS, but only use Node for tooling, so need to learn a bit more Express and Mongo
Nitya Narasimhan
@nitya
May 18 2015 04:11
Hmm. Any possibility of shifting to Polymer for front end now that they are going 1.0 at I/O? Personally I think GDG[X] lends itself beautifully to custom elements and would love to work on that group if so.
okay — have to hop off now. (Look out on Slack for the rehearsal list first thing tomorrow — Laura will probably post it, else I’ll do so)
Michael Prentice
@Splaktar
May 18 2015 04:15
Would like to do custom components with Angular 2.0, but don’t want to loose the MVP/MVVM architecture of AngularJS. It makes working with teams a lot easier and more consistent.
After the summit, I’ll start messing with upgrading things to Angular 2.0.