Changes:
Add Python 3.10 support (#36)
- Work began on Python 3.10 support nearly nine months ago.
- inboard is now able to support Python 3.10.
- The primary blockers were Poetry and pydantic.
Add configurable logging filter (#49)
- Filters identify log messages to filter out, so that the logger does
not log messages containing any of the filters. If any matches are
present in a log message, the logger will not output the message.
- The environment variable `LOG_FILTERS` can be used to specify filters
as a comma-separated string, like `LOG_FILTERS="/health, /heartbeat"`.
To then add the filters to a class instance, the
`LogFilter.set_filters()` method can make the set of filters from the
environment variable value.
- One of the primary use cases for log message filters is health checks.
When applications with APIs are deployed, it is common to perform
"health checks" on them. Health checks are usually performed by making
HTTP requests to a designated API endpoint. These checks are made at
frequent intervals, and so they can fill up the access logs with large
numbers of unnecessary log records. To avoid logging health checks,
add those endpoints to the `LOG_FILTERS` environment variable.
Support module paths for Gunicorn config files (e068622, 75b3a48)
- Gunicorn accepts either file paths or module paths. Module paths are
prefixed with "python:".
- inboard will now support module paths (in addition to file paths) with
the `GUNICORN_CONF` environment variable.
- inboard will now use a module path as the default.
Commits:
- Bump version from 0.22.0 to 0.23.0 (b1a6855)
- Merge pull request #36 from br3ndonland/python-3.10 (7b2fdf6)
- Update type annotations for Python 3.10 (f3fd95d)
- Use Python 3.10 as default version in Dockerfile (760c071)
- Add Python 3.10 to GitHub Actions workflows (1fbcdeb)
- Merge pull request #49 from br3ndonland/logging-filter (97e35b7)
- Refactor #49 with Sourcery (#50) (fba2fd2)
- Add configurable logging filter (32792cd)
- Update dependencies (80cbaf4)
- Update pre-commit dependencies (0746175)
- Resolve Black pre-commit hook `ImportError` (cb62817)
- Add complete logging override example to docs (94d202b)
- Use Python module path as `gunicorn_conf` default (75b3a48)
- Set default `PRE_START_PATH` to `None` (8c8c6cf)
- Move pydantic response models to `main_fastapi.py` (4990a2e)
- Refactor `test_main.py` (e6a6060)
- Remove the last `# noqa: E501` Flake8 comment (21667c5)
- Clarify pytest fixture request variable names (35d4d2c)
- Support module paths for Gunicorn config files (e068622)