Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Add instrumentation for Search API #885

Merged
merged 11 commits into from
Jun 26, 2020
Merged

Add instrumentation for Search API #885

merged 11 commits into from
Jun 26, 2020

Conversation

arberiii
Copy link
Member

This PR adds instrumentation to the search API. It has only two metrics: search-failed and search-succeded.

@arberiii arberiii added enhancement New feature or request Go Issue requires to write code using Go language labels Jun 25, 2020
@arberiii arberiii self-assigned this Jun 25, 2020
@arberiii arberiii added this to In progress in Search APIs via automation Jun 25, 2020
@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #885 into master will increase coverage by 9.25%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Flag Coverage Δ
#golang 70.91% <ø> (+7.69%) ⬆️
#typescript 24.87% <ø> (ø)
Impacted Files Coverage Δ
backend/app/adapter/sqldb/user_short_link.go 63.04% <0.00%> (ø)
backend/app/adapter/sqldb/user_changelog.go 92.85% <0.00%> (ø)
backend/app/adapter/sqldb/featuretoggle.go 100.00% <0.00%> (ø)
backend/app/adapter/sqldb/user.go 95.16% <0.00%> (ø)
backend/app/adapter/sqldb/short_link.go 92.66% <0.00%> (ø)
backend/app/adapter/sqldb/facebooksso.go 56.86% <0.00%> (ø)
backend/app/adapter/sqldb/time.go 100.00% <0.00%> (ø)
backend/app/adapter/sqldb/changelog.go 89.47% <0.00%> (ø)
backend/app/adapter/sqldb/googlesso.go 56.86% <0.00%> (ø)
backend/app/adapter/sqldb/bool.go 100.00% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0389cc...936e982. Read the comment docs.

@magicoder10 magicoder10 added this to the 06/22 - 06/28 milestone Jun 26, 2020
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.Write(respBody)
i.SearchSucceed()
Copy link
Member

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.

Search APIs automation moved this from In progress to Review in progress Jun 26, 2020
userID := i.getUserID(user)
props := map[string]string{
"keywords": keywords,
"time": t.String(),
Copy link
Member

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 APIs automation moved this from Review in progress to Reviewer approved Jun 26, 2020
@arberiii arberiii merged commit d22f37e into master Jun 26, 2020
Search APIs automation moved this from Reviewer approved to Done Jun 26, 2020
@arberiii arberiii deleted the search-instrumenation branch June 26, 2020 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Go Issue requires to write code using Go language size/M
Projects
No open projects
Search APIs
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants