heroku / heroku-buildpack-python

Heroku's buildpack for Python applications.
https://www.heroku.com/python
MIT License
973 stars 1.83k forks source link

Implement `bin/report` #1597

Closed edmorley closed 1 month ago

edmorley commented 1 month ago

Implements the bin/report build report API, as a replacement for log based metrics (which stopped working some time ago with the change in internal observability vendor).

This will help with various upcoming Python buildpack changes, such as the EOL of Python 3.8, assessing usage levels of different package managers (wrt Poetry addition, and future of Pipenv for CNB), removal of the legacy sqlite feature etc.

This implementation is based on that used by the Node.js buildpack, which is currently the only buildpack that implements bin/report. There are a number of rough edges with the Node.js implementation that in an ideal world we'd improve upon. However, given that that implementation works, is actively used in production, and CNBs are our priority moving forwards, I've chosen not to make many changes to that design.

See: https://github.com/heroku/heroku-buildpack-nodejs/blob/main/bin/report https://github.com/heroku/heroku-buildpack-nodejs/blob/main/lib/metadata.sh https://github.com/heroku/heroku-buildpack-nodejs/blob/main/lib/kvstore.sh

GUS-W-8047826.