prometheus/client_python
Prometheus instrumentation library for Python applications
📋 What's Changed
- Fix spaces in grouping key values for push_to_gateway by @veeceey in https://github.com/prometheus/client_python/pull/1156
- Support MultiProcessCollector in RestrictedRegistry by @mathias-kende in https://github.com/prometheus/client_python/pull/1150
- Full Changelog: https://github.com/prometheus/client_python/compare/v0.24.1...v0.25.0
📋 Changes
- [Django] Pass correct registry to MultiProcessCollector by @jelly in https://github.com/prometheus/client_python/pull/1152
📋 What's Changed
- Add an AIOHTTP exporter by @Lexicality in https://github.com/prometheus/client_python/pull/1139
- Add remove_matching() method for metric label deletion by @hazel-shen in https://github.com/prometheus/client_python/pull/1121
- fix(multiprocess): avoid double-building child metric names (#1035) by @hazel-shen in https://github.com/prometheus/client_python/pull/1146
- Don't interleave histogram metrics in multi-process collector by @cjwatson in https://github.com/prometheus/client_python/pull/1148
- Relax registry type annotations for exposition by @cjwatson in https://github.com/prometheus/client_python/pull/1149
- Added compression support in pushgateway by @ritesh-avesha in https://github.com/prometheus/client_python/pull/1144
- Add Django exporter (#1088) by @Chadys in https://github.com/prometheus/client_python/pull/1143
- Full Changelog: https://github.com/prometheus/client_python/compare/v0.23.1...v0.24.0
📋 What's Changed
- fix: use tuples instead of packaging Version by @efiop in https://github.com/prometheus/client_python/pull/1136
✨ New Contributors
- @efiop made their first contribution in https://github.com/prometheus/client_python/pull/1136
- Full Changelog: https://github.com/prometheus/client_python/compare/v0.23.0...v0.23.1
📋 What's Changed
- UTF-8 Content Negotiation by @ywwg in https://github.com/prometheus/client_python/pull/1102
- Re include test data by @mgorny in https://github.com/prometheus/client_python/pull/1113
- Improve parser performance by @csmarchbanks in https://github.com/prometheus/client_python/pull/1117
- Add support to `write_to_textfile` for custom tmpdir by @aadityadhruv in https://github.com/prometheus/client_python/pull/1115
- OM text exposition for NH by @vesari in https://github.com/prometheus/client_python/pull/1087
- Fix bug which caused metric publishing to not accept query string parameters in ASGI app by @hacksparr0w in https://github.com/prometheus/client_python/pull/1125
- Emit native histograms only when OM 2.0.0 is requested by @vesari in https://github.com/prometheus/client_python/pull/1128
- fix: remove space after comma in openmetrics exposition by @theSuess in https://github.com/prometheus/client_python/pull/1132
- + 1 more
✨ New Contributors
- @mgorny made their first contribution in https://github.com/prometheus/client_python/pull/1113
- @aadityadhruv made their first contribution in https://github.com/prometheus/client_python/pull/1115
- @hacksparr0w made their first contribution in https://github.com/prometheus/client_python/pull/1125
- @theSuess made their first contribution in https://github.com/prometheus/client_python/pull/1132
- Full Changelog: https://github.com/prometheus/client_python/compare/v0.22.1...v0.23.0
📋 What's Changed
- BugFix: Skip validating and parsing comment lines early (#1108) by @wissamir in https://github.com/prometheus/client_python/pull/1109
- Use License Expressions in pyproject.toml by @csmarchbanks in https://github.com/prometheus/client_python/pull/1111
- Full Changelog: https://github.com/prometheus/client_python/compare/v0.22.0...v0.22.1
📋 What's Changed
- Add support for native histograms in OM parser by @vesari in https://github.com/prometheus/client_python/pull/1040
- Add exemplar support to CounterMetricFamily [Fix #1062] by @lod in https://github.com/prometheus/client_python/pull/1063
- Fix `write_to_textfile` leaves back temp files on errors by @ethanschen in https://github.com/prometheus/client_python/pull/1066
- Support UTF-8 in metric creation, parsing, and exposition by @ywwg in https://github.com/prometheus/client_python/pull/1070
- Fix incorrect use of reentrant locks by @suligap in https://github.com/prometheus/client_python/pull/1076
- Remove Python 3.8 support by @kajinamit in https://github.com/prometheus/client_python/pull/1075
- Check if labelvalues is in _metrics before deletion in MetricWrapperBase.remove() by @GlorifiedPig in https://github.com/prometheus/client_python/pull/1077
- Add support for Python 3.13 by @Pliner in https://github.com/prometheus/client_python/pull/1080
- + 9 more
📋 What's Changed
- [BUGFIX] Revert incorrect use of reentrant locks. #1076
📋 What's Changed
- [CHANGE] Reject invalid (not GET or OPTION) HTTP methods. #1019
- [ENHANCEMENT] Allow writing metrics when holding a lock for the metric in the same thread. #1014
- [BUGFIX] Check for and error on None label values. #1012
- [BUGFIX] Fix timestamp comparison. #1038
📋 What's Changed
- [CHANGE/BUGFIX] Update OpenMetrics Content Type to 1.0.0. #997
- [FEATURE] Enable graceful shutdown for start_{http,wsgi}_server by returning the server and thread. #999
- [FEATURE] Allow resetting counter metrics. #1005
- [BUGFIX] wsgi server: address family discovery is not quite right. #1006
📋 What's Changed
- [FEATURE] support HTTPS/TLS in start_http_server. #946
- [BUGFIX] fix: error in determining timestamp less than. #979
[CHANGE] Remove support for Python versions < 3.8. #936 [FEATURE] Add `mostrecent` aggregation to Gauge. #967 [ENHANCEMENT] Typing improvements. #935, #970 [ENHANCEMENT] Allow enabling or disabling `_created` metrics from code. #973 [BUGFIX] Change #!/usr/bin/python to #!/usr/bin/env python in remaining places. #945
[BUGFIX] Use #!/usr/bin/env python instead of #!usr/bin/python in bridge/graphite.py. #928
[ENHANCEMENT] Add additional typing. #887, #903 [BUGFIX] Fix typo in python_gc_objects_collected metadata. #894 [BUGFIX] Do not include .pyc files in the build wheel. #906
[FEATURE] Support HELP text in multiprocess mode. #804 [ENHANCEMENT] Reduce the mmap minimum size. #853 [BUGFIX] Use the correct OpenMetrics encoder when `application/openmetrics-text` is requested in ASGI apps. #864 [BUGFIX] Allow Prometheus format parser to handle a missing space after labels. #872
[CHANGE] Remove `choose_formatter`. `choose_formatter` only existed for v0.14.x and was deprecated in v0.14.1. https://github.com/prometheus/client_python/pull/846 [FEATURE] Support TLS auth when using push gateway with `tls_auth_handler`. https://github.com/prometheus/client_python/pull/841 [ENHANCEMENT] Add `sum`, `livemin`, and `livemax` multiprocess modes for `Gauge`s. https://github.com/prometheus/client_python/pull/794
[BUGFIX] Revert `choose_encoder` being renamed to `choose_formatter` to fix a breaking change. For the 0.14.x release cycle `choose_formatter` will still exist, but will be removed in 0.15.0. #796
[ENHANCEMENT] Continued typing improvements and coverage. #759, #771, #781 [ENHANCEMENT] Allow binding to IPv6 addresses. #657 [ENHANCEMENT] Negotiate gzip content-encoding, enabled by default. #776 [ENHANCEMENT] Allow disabling `_created` metrics via the `PROMETHEUS_DISABLE_CREATED_SERIES` environment variable. #774 [BUGFIX] Correct minor typo in exception raised when exemplar labels are too long. #773
[BUGFIX] Relax some type constraints that were too strict. #754, #755, #756, #758 [BUGFIX] Explicitly export functions with `__all__`. #757
[CHANGE] Drop support for Python versions 2.7, 3.4, and 3.5. #718 [FEATURE] Support adding labels when using `.time()` #730 [ENHANCEMENT] Begin to add type hints to functions. #705 [ENHANCEMENT] Improved go-to-declaration behavior for editors. #747 [BUGFIX] Remove trailing slashes from pushgateway URLS. #722 [BUGFIX] Catch non-integer bucket/count values. #726
[FEATURE] Exemplar support (excludes multiprocess) #669 [ENHANCEMENT] Add support for Python 3.10 #706 [ENHANCEMENT] Restricted Registry will handle metrics added after restricting #675, #680 [ENHANCEMENT] Raise a more helpful error if a metric is not observable #666 [BUGFIX] Fix instance_ip_grouping_key not working on MacOS #687 [BUGFIX] Fix assertion error from favicion.ico with Python 2.7 #715
[CHANGE] Specify that the `labelvalues` argument on metric constructors is internal by renaming it to `_labelvalues`. If you are affected by this change, it is likely that the metric was not being registered. #660 [BUGFIX] `write_to_textfile` will overwrite files in windows. If using python 3.4 or newer the replace will be atomic. #650
[BUGFIX] Support lowercase `prometheus_multiproc_dir` environment variable in `mark_process_dead`. #644
📋 Changes
- [CHANGE] Python 2.6 is no longer supported. #592
- [CHANGE] The `prometheus_multiproc_dir` environment variable is deprecated in favor of `PROMETHEUS_MULTIPROC_DIR`. #624
- [FEATURE] Follow redirects when pushing to Pushgateway using `passthrough_redirect_handler`. #622
- [FEATURE] Metrics support a `clear()` method to remove all children. #642
- [ENHANCEMENT] Tag support in GraphiteBridge. #618
[ENHANCEMENT] Add support for python3.9 (#600) [ENHANCEMENT] Various updates for latest OpenMetrics draft spec (#576 #577)
[FEATURE] Added ASGI application (#512) [FEATURE] Add support for parsing timestamps in Prometheus exposition format. (#483) [FEATURE] Add target_info to registries (#453) [ENHANCEMENT] Handle empty and slashes in label values for pushgateway (#547 #442) [ENHANCEMENT] Various updates for latest OpenMetrics draft spec (#434 #445 #538 #460 #496) [ENHANCEMENT] Add `HELP` output for auto-created metrics (#471) [ENHANCEMENT] Use mmap.PAGESIZE constant as value for first read. (#505) [ENHANCEMENT] Add `__repr__` method to metric objects, make them debug friendly. (#481) [ENHANCEMENT] Add observability check to metrics (#455 #520) [BUGFIX] Fix urlparse in python >= 3.7.6 (#497) [BUGFIX] Cleaning up name before appending unit on name (#543) [BUGFIX] Allow for OSError on Google App Engine (#448)
[BUGFIX] multiprocess: don't crash on missing gauge_live/sum files (#424) [BUGFIX] correctly bind method on Python 2.x (#403)
[ENHANCEMENT] Multiprocess exposition speed boost (#421) [ENHANCEMENT] optimize openmetrics text parsing (~4x perf) (#402) [ENHANCEMENT] Add python3.7 support (#418) [ENHANCEMENT] Change exemplar length limit to be only for label names+values (#397) [BUGFIX] Disable gcCollector for pypy (#380)
[ENHANCEMENT] Better exceptions on exposition failure (#364) [BUGFIX] Fix deadlock in gcCollector, metrics are now different (#371) [BUGFIX] Fix thread leak in Python 3.7 (#356) [BUGFIX] Make the format strings compatible with Python 2.6 (#361) [BUGFIX] parser: ensure samples are of type Sample (#358)
[ENHANCEMENT] Be more resilient to certain file corruptions (#329) [ENHANCEMENT] Permit subclassing of MetricsHandler (#339) [ENHANCEMENT] Updates based on latest OpenMetrics draft spec discussions (#338 #346) [BUGFIX] In multiprocess mode, ensure that metrics initialise to the correct file (#346) [BUGFIX] Avoid re-entrant calls to GC collector's callback (#343)
