Skip to content

Latest commit

 

History

History
324 lines (212 loc) · 9.73 KB

CHANGELOG.md

File metadata and controls

324 lines (212 loc) · 9.73 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning as well as the Conventional Commits specification.

Unreleased

Added

Only relevant for CI:

  • dependabot.yml that daily checks github-actions and pip.

Changed

  • Bumped lowest required Python version from 3.6.0 to 3.6.2 due to Black requirements.

Only relevant for development:

  • Updated dev dependencies via pyproject.toml

[5.7.1] 2021-01-12

Changed

  • Ran poetry update.
  • Updated all development dependencies to newest (non-conflicting) versions.

Fixed

  • Updated prometheus-client dependency version constraint ^0.8.0 that only allows versions in the range [0.8.0, 0.9.0[. This is not correct and leads to conflicts when you want to install the newest prometheus client library version and this package. Switched to explicit contraints to ensure this does not happen again.

[5.7.0] 2020-12-13

Added

  • Passthrough of Kwargs to FastAPI route that exposes metrics.

Changed

All changes are minor and non-breaking and mostly effect development only.

  • Most of the stuff that is not directly related to the code has been replaced with common files / scripts from another repository of mine I use as a kind of template for Python projects you can find here.
  • Replaced Makefile with simple Bash script that contains a bunch of functions. Easier to maintain and to use.
  • Replace workflow files with new workflows.
  • Add conftest.py that provides utilities for testing.
  • Reliscenced from MIT to Apache-2.0.
  • Added DEVELOPMENT.md.
  • Introduced MyPy for linting during development.
  • Updated docs.

[5.6.0] 2020-12-03

Added

  • Parameter tags to method expose(). Passthrough to FastAPI to support tagging. Raised by @chisaipete here.

[5.5.1] 2020-11-13

Fixed

  • "Duplicate mime type charset=utf-8 on Response Header" raised by @flobaader in this issue. Fixed in commit by changing the way the content type header is set. Seems like when Starlette's media_type parameter is used to provide content type, the charset is appended again automatically even if it already is part of Content-Type.

Changed

  • Run poetry update and with that updated a few dependencies.

[5.5.0] 2020-11-01

Added

  • New metrics closure requests. Idea raised by @jpslopes here.

Changed

  • Small improvements to docstrings / docs.
  • Run poetry update.

[5.4.1] 2020-10-22

Fixed

  • Regression introduced in 5.4.1 by pinning FastAPI dependency to fastapi = "0.38.1, <=1.0.0" instead of fastapi = ">=0.38.1, <=1.0.0". Thanks to @PaulFlanaganGenscape for rasing this issue here.

[5.4.0] 2020-10-20

Added

  • New metric that monitors the number of requests in progress. Can be configured to have the labels handler and method. It can be activated with should_instrument_requests_inprogress and configured with inprogress_name and inprogress_labels. Check the autogenerated docs for more info. Implementation not as nice as all the others because the metric requires to be incremented before actually getting the response. This kind of conflicts with the approach of this project. See e62576e3640be0b677334537d27bc267ab0e91cf for the implementation commit.

Changed

  • Updated a few of the development dependencies to newer versions.
  • Updated CI to test with Python 3.9 instead of 3.8.
  • Replace deprecated way of creating GitHub environment variables in workflows.
  • Update few minor things around the GitHub workflow files.

[5.3.1] 2020-09-25

Fixed

  • Fix for trallnag#9. The expose method in the instrumentator ignores the endpoint argument and always creates the endpoint with the path /metrics. Variable was missing. Raised by @funkybase on 2020-09-24.

Changed

  • Poetry update

[5.3.0] 2020-09-09

Added

  • Parameter should_gzip to expose method will check for gzip in the Accepted-Encoding header and gzip the metrics data. You can expect a reduction of around 90 % in bytes.

Changed

  • Poetry update

[5.2.3] [5.2.2] 2020-09-03

Changed

  • Improvements to the README and updated dev dependencies.
  • Work in GitHub Release workflow.

[5.2.1] 2020-08-27

Fixed

  • Fix for trallnag#7. If a run time error is raised inside the endpoint, FastAPI will not wrap the error in a response object. In addition this instrumentator assumed that info.response will always contain the headers attribute which is not the case if a runtime error is thrown. Now the metrics check if the response is None and that the headers attribute actually exists. Tests have been added as well.

Changed

  • Metrics response_size and combined_size no longer skip if content length is not found. Now the content length will default no zero bytes.

[5.2.0] 2020-08-22

Added

  • Parameter should_only_respect_2xx_for_highr to default metrics. Allows you to only put successful requests into the high resolution bucket.

[5.1.0] 2020-08-19

Added

  • Parameters to set namespace and subsystem to all available metrics.

[5.0.0] 2020-08-18

Changed

  • Rename instrumentation full to default.
  • Add labels handler, status, method to http_requests_total in default.
  • Rename http_in_bytes_total to http_request_size_bytes.
  • Add label handler to http_request_size_bytes.
  • Rename http_out_bytes_total to http_response_size_bytes.
  • Add label handler to http_response_size_bytes.
  • Rename http_highr_request_duration_seconds to http_request_duration_highr_seconds.
  • Rename http_lowr_request_duration_seconds to http_request_duration_seconds.
  • Remove labels method and status from http_request_duration_seconds.
  • Turn http_request_size_bytes and http_response_size_bytes into summaries.

[4.0.0] 2020-08-16

  • Refactored available metrics. Made them more modular while improving code structure.
  • Switched the default fast track metric to a more advanced one.
  • Added proper documentation.

[3.0.0] 2020-08-15

A lot of breaking changes in this release. Prometheus FastAPI Instrumentator is now more modular than before and there are multiple different metrics one can choose from out of the box or add custom metrics that will be automatically applied to the FastAPI.

Changed

  • If you just use the default instrumentator without setting any parameters, nothing changes. The defaults stay the same.
  • If you use any of the paramters that were available in the Instrumentator constructor you have to check if they are still available or not. Some of them have been moved to the corresponding metric closure / function. I recommend to go through the updated documentation.
  • Endpoint /metrics is not excluded by default anymore.
  • Updated README.md.

[2.0.1] 2020-08-14

Changed

  • Fixed wrong var name in README.md.

[2.0.0] 2020-08-14

Added

  • Option to exclude optional /metrics endpoint from schema.

Changed

  • Renamed should_respect_env_var_existence to should_respect_env_var.
  • If should_respect_env_var is True, the respective env var must be true and not just any random value.
  • Renamed default env var if should_respect_env_var from PROMETHEUS to ENABLE_METRICS.

[1.3.0] 2020-08-12

Added

  • Option should_respect_env_var_existence.
    • This makes it possible to only instrument and expose your FastAPI if a given environment variable is set.
    • Usecase: A base FastAPI app that is used by multiple distinct apps. The apps only have to set the variable to be instrumented.
    • Deactivated by default and the default env var is PROMETHEUS.

[1.2.0] 2020-08-06

Added

  • The observed latency values can now be rounded to a certain number of decimals as an opt-in feature. This can improve bytes per sample required in storage solutions like VictoriaMetrics.

[1.1.1] 2020-07-19

  • Nothing

[1.1.0] 2020-07-16

Changed

  • Renamed project from Prometheus FastAPI Exporter to Prometheus FastAPI Instrumentator. Reasoning behind this change: Focus of this project is the instrumentation, not exposition of metrics.

[1.0.2] 2020-07-15

Changed

  • Updated README.md

[1.0.1] 2020-07-15

Changed

  • Updated README.md

[1.0.0] 2020-07-15

Added

  • Explicit method to expose metrics by adding endpoint to an FastAPI app.
  • This changelog document.

Changed

  • Switch to SemVer versioning.
  • Split instrumentation and exposition into two parts. Why? There exist many ways to expose metrics. Now this package enables the instrumentation of FastAPI without enforcing a certain method of exposition. It is still possible with the new method expose().
  • Moved pass of FastAPI object from constructor to instrument() method.
  • Extended testing.

Removed

  • Exposition of metrics endpoint from ìnstrument() call.
  • Contribution document. No need for it.

[20.7.8] [YANKED]

[20.7.7] [YANKED]

... [YANKED]

Unreleased

  • Nothing