The navtiming service processes web beacons containing performance data from web browsers, and submits aggregate metrics to Prometheus and Statsd.
Python 3.9 or later is required.
- Ensure pip is installed. If your system has Python installed without pip (such as on macOS), you can either install it with EasyInstall using
sudo easy_install pip, or choose to install Python locally from Homebrew (which comes with pip). - Ensure tox is installed. Install it with
pip install tox, or (if pip was installed with sudo)sudo pip install tox.
To run the tests, simply run tox -v.
To ease local debugging, you can start navtiming locally without Kafka. Use the --kafka-fixture option to instead read lines of JSON from a static file. In this mode, it will still formulate Statsd messages and expose a Prometheus client.
$ tox -v
$ .tox/py3/bin/navtiming --dry-run --kafka-fixture ./events.json
navtiming.py can be configured either via an .ini file in the base of the repository, via command line, or a combination of the two. If a configuration variable is provided in both the config.ini file and on the command line, the command line value is the one that is used.
In general, the configs that are used will be a merge of the values in the section [defaults] with the values in the section named after the wikimedia-cluster. For testing, it's suggested that you set this value to "local".
This repository is maintained on Gerrit. See https://www.mediawiki.org/wiki/Developer_access for how to submit patches.
Submit bug reports or feature requests to Phabricator.
This project is maintained by the Performance Team.