Add "totals" api to stats API

VERIFIED FIXED in 2013-12-10

Status

Marketplace
Statistics
P2
normal
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: Aaron, Assigned: robhudson)

Tracking

Avenir
2013-12-10
x86
Mac OS X
Points:
---

Details

Attachments

(1 attachment)

116.31 KB, image/png
Details
(Reporter)

Description

4 years ago
Created attachment 826004 [details]
graph

Is there a way to see the total amount of installs of your app?
Component: Admin Tools → Developer Pages
Component: Developer Pages → Statistics
(Assignee)

Comment 1

4 years ago
I believe we can get totals (and other stats) about all our data in Monolith using the term stats facet:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-stats-facet.html

We should consider a general "totals" API add to our stats API with app ID or stats key as parameters that returns total (and/or other stats).
Priority: -- → P3
(Assignee)

Comment 2

4 years ago
Bumping up to P2 as this will be required for dashboard.
Priority: P3 → P2
Summary: Is there a way to see the total number of installs your apps has? → Add "totals" api to stats API
(Assignee)

Updated

4 years ago
Assignee: nobody → robhudson.mozbugs
(Assignee)

Comment 3

4 years ago
We're going to go with something like:

  /api/v1/stats/app/<slug>/totals/<metric>/

where <metric> could be 'installs' or 'developers' or whatever we have in the system.

Response will be a simple JSON object like:

  {"total": 1234}
(Assignee)

Comment 4

4 years ago
Partially implemented in https://github.com/mozilla/zamboni/commit/f0a25bb 

This implements the per-app totals. There were some changes from comment #3.

The URL is a single one for all metrics:

  /api/v1/stats/app/<slug>/totals/

The response is keyed on metric and contains more statistical info that's provided from Elasticsearch:

{
    "installs": {
        "max": 224.0,
        "mean": 184.80000000000001,
        "min": 132.0,
        "sum_of_squares": 692112.0,
        "std_deviation": 21.320412753978232,
        "total": 3696.0,
        "variance": 454.55999999999767
    },
    ...
}

To verify, try a URL like this:
https://marketplace-dev.allizom.org/api/v1/stats/app/twitter/totals/
(with your _user token as a query string)

Leaving open to finish the global stats version of this.
(Assignee)

Comment 5

4 years ago
Global stats added in https://github.com/mozilla/zamboni/commit/d6ae161.

The URL for global stats totals is: /api/v1/stats/global/totals/ and look similar to the output in comment #4.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-12-10

Comment 6

4 years ago
Verified as fixed in https://marketplace-dev.allizom.org/api/v1/stats/app/twitter/totals/ and https://marketplace-dev.allizom.org/stats/apps-installed-total/ on FF28 (Win 7).
Closing bug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.