This is an Airflow plugin that directly queries the Airflow metadata database and returns certain analytics at an HTTP endpoint.
This plugin is installed by default in the astro-runtime images starting with 6.1.0-alpha4. It should not need to be manually installed by users.
You must have the astro CLI installed.
-
Clone repo
-
Run
astro dev init
-
Create a directory and copy some files into the
plugins/
directory of your Astro project:cp analytics_plugin.py ./plugins
-
Run
astro dev start
-
Login to the local Airflow webserver at
http://localhost:8080
with the username and password provided. . To get the total numbers of successful and failed tasks, initiate an HTTP request:curl "http://localhost:8080/astronomeranalytics/v1/tasks?startDate=2022-08-01&endDate=2022-08-30"
with optional URL query parameters startDate and endDate.
Example response:
{ "tasks": { "total_failed": 25841090, "total_success": 12826442 } }
- Update the
__version__
variable inanalytics_plugin.py
- Run
python -m build
- Upload the generated Wheel (
.whl
) and.tar.gz
files generated indist/
to GitHub as a release