Add analytics pageview module, spec, and tests#343
Add analytics pageview module, spec, and tests#343zzmoss wants to merge 1 commit intowikimedia:masterfrom
Conversation
Bug: T107053
There was a problem hiding this comment.
There's no need to define a separate config.test.analytics.yaml, as it's not picked up anywhere, therefor tests are failing in travis. Just adding
/{module:pageviews}:
x-modules:
- name: pageviews
version: 1.0.0
type: fileto the config.test.yaml would be enough.
|
I'm quite confused. This PR seems to aim at integrating the pageviews logic completely into the upstream RESTBase. Alas, you will have your own RESTBase instance set up in the analytics cluster. If you want to make your module publicly available, I think it would better to package and publish it as a separate npm module and document it there (cf the Cassandra module and the SQLite module for examples of stand-alone RESTBase modules). |
There was a problem hiding this comment.
In case a string is actually a enum, you could add a swagger enum to get a nice choice box in resulting docs.
|
One more confusion is that I didn't find any references to the backend analytics service, so it's not clear to me, how the data would be pulled into cassandra storage? Also, please not that all new tests are failing on travis. |
To answer your question @Pchelolo and clarify further my previous comment, there will soon be an additional RESTBase instance in WMF production to fulfil Analitics team's needs (pageviews API); cf. Gerrit patch 231574 which adds its production configuration. The idea is that the principal RESTBase instance only exposes the public API and simply forwards all of the requests to the internal pageviews RESTBase instance. As such, the only thing that should be in this PR is the specification that exposes the public API endpoints and their connection to the pageviews RESTBase instance. |
Follow-up: AFAIC, I'm not against adding Regarding the public routes themselves, the
|
|
also let's cc @wikimedia/analytics and @wikimedia/services here :) |
|
Closing in favour of #350 |
Bug on phabricator: T107053
These would be the frontend to backend mappings we need on all wikis (basically just making the {domain} map implicitly to the {project} parameter on our backend:
And for the global wikimedia.org we could just pass whatever comes after stats/* straight through, there would be no rewriting. This is where people could pass values such as "all-projects" for the {project} parameter.