Details
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T228175 Event Platform Client Libraries | |||
Open | None | T282003 Metrics Platform: Streamline the process to create new instrumentations | |||
Resolved | • Mholloway | T239996 Send batches of events from EPC app libraries (Java, Swift) | |||
Open | None | T276378 EPIC: Release Metrics Platform v1 | |||
Resolved | phuedx | T281772 [EPIC] Incorporate librarized Metrics Platform Java client into the Android app | |||
Resolved | cjming | T281773 Publish librarized Metrics Platform Java client to Maven | |||
Resolved | • Mholloway | T281757 Conslidate Metrics Platform Java client into mediawiki/libs/metrics-platform | |||
Resolved | cjming | T318934 Extend the Java MPC to detect session inactivity | |||
Resolved | cjming | T318935 Refactor Java MPC's event sending code | |||
Resolved | cjming | T318947 Add dispatch method to Java MPC | |||
Resolved | cjming | T318948 Refactor Java MPC's stream config fetching code |
Event Timeline
Comment Actions
Here are my notes on the Android (Java) implementation as of rMLMP7ceb5cbb9e75: Simplify event queuing by using a single buffer.:
Low Complexity
A session is 30 minutes long- Events should have contextual attributes set immediately.
- Consider the following case: the user navigates to page A; backgrounds the application; foregrounds it some considerable time later; and navigates to page B. If the actions after the navigation to page A all occur before the enqueued event is sent, then the event will be sent with incorrect contextual values (as well as, potentially, a new session ID)
The responsibility of maintaining session state is split between SessionController and MetricsClientI suggest reducing the SessionController API to touch() and getSessionID()SessionController.getSessionID() should transparently refresh the session ID if the session hasn't been "touched" in 30 minutes
Medium-to-high Complexity
- Sessions don't automatically expire
- The SessionTick instrument detects when a user session has been idle for 30 minutes. Idle here means that the user hasn't clicked, pressed a key, scrolled, or backgrounded/foregrounded
- MetricsClient has the responsibility of maintaining and periodically flushing the queue of events. This should be a separate class/collection of classes that MetricsClient collaborates with (see https://gerrit.wikimedia.org/r/c/mediawiki/libs/metrics-platform/+/820530)
- MetricsClient has the responsibility of maintaining and periodically updating the stream config collection. This should be a separate class/collection of classes that MetricsClient collaborates with
- StreamConfigs are fetched every 30 seconds. What about radio/data consumption?
- Events should be sent in batches. EventGate is capable of accepting multiple events in one request
High complexity
- MetricsClient has no dispatch() method
- The implementation should be consistent with the implementations for the JS and PHP clients. There's a test harness that can test that the clients are producing consistent events given the same configuration in the top-level of the repo
Comment Actions
Change 836126 had a related patch set uploaded (by Phuedx; author: Phuedx):
[mediawiki/libs/metrics-platform@master] SessionController: Reduce API surface area
Comment Actions
Change 836791 had a related patch set uploaded (by Phuedx; author: Phuedx):
[mediawiki/libs/metrics-platform@master] [Java] SessionController: The session length is 30 minutes
Comment Actions
Change 836126 merged by jenkins-bot:
[mediawiki/libs/metrics-platform@master] [Java] SessionController: Reduce API surface area
Comment Actions
Change 836791 merged by jenkins-bot:
[mediawiki/libs/metrics-platform@master] [Java] SessionController: The session length is 30 minutes