-
Notifications
You must be signed in to change notification settings - Fork 148
Conversation
Codecov Report
@@ Coverage Diff @@
## master #885 +/- ##
==========================================
+ Coverage 44.17% 53.42% +9.25%
==========================================
Files 120 132 +12
Lines 2420 3165 +745
Branches 154 154
==========================================
+ Hits 1069 1691 +622
- Misses 1305 1406 +101
- Partials 46 68 +22
Continue to review full report at Codecov.
|
http.Error(w, err.Error(), http.StatusInternalServerError) | ||
return | ||
} | ||
|
||
w.Write(respBody) | ||
i.SearchSucceed() |
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.
We need to track the keyword being searched, in which city and at what time so that we can analyze and determine the new features we want to build in order to better serve the users. This means we need to include analytics.
userID := i.getUserID(user) | ||
props := map[string]string{ | ||
"keywords": keywords, | ||
"time": t.String(), |
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.
Time is automatically tracked by analytics API. I wonder whether we can track the list of resources
being search also. Let's separate them with ,
.
… search-instrumenation
3b39848
to
936e982
Compare
This PR adds instrumentation to the search API. It has only two metrics: search-failed and search-succeded.