alexandrit
v0.1.2
Published
lighthouse to prometheus metrics exporter
Downloads
5
Readme
alexandrit
Lighthouse metrics provisioner in the prometheus format (scratch version). Runs server on the specified port (3031 by default),
uses puppeteer to calculate metrics in prometheus format and returns it on /metrics
endpoint.
Installation
> npm i -g alexandrit
How to use
You should provide URL of web app to observe and optionally specify config.json
which specifies puppeteer and lighthouse options.
> alexandrit <--url url-to-provision> \
[--config=path to config.json] \
[--port=port on which to listen ]
List of supported metrics (to be updated)
- First Contentful Paint
- First Meaningful Paint
- Interactive (Time to Interactive)
- Largest Contentful Paint
Configuration
Currently, you can only configure alexandrit using CLI option or environment variable ALEXANDRIT_CONFIG_FILE
which specify path to the config file in json format (going to change to the yml).
config file structure
{
"lighthouseFlags": {
"logLevel": "info",
"disableDeviceEmulation": true,
"chromeFlags": ["--disable-mobile-emulation", "--headless"]
},
"lighthouseConfig": {
"extends": "lighthouse:default",
"settings": {
"emulatedFormFactor": "desktop"
}
},
"puppeteerConfig": {
"args": ["--no-sandbox"]
}
}