master
Name already in use
Commits on Oct 13, 2022
Commits on Oct 11, 2022
-
Merge pull request #827 from sss-ng/docs/remove-default-metrics
updated docs with code to remove default metrics
-
Merge pull request #846 from prometheus/remove-deprecated-function
Remove choose_formatter before 0.15.0 release
-
Remove choose_formatter before 0.15.0 release
The original choose_encoder function was accidentally renamed in 0.14.0 to choose_formatter. In 0.14.1 we left both functions but with choose_formatter marked deprecated and to be removed by 0.15.0. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Merge pull request #841 from prometheus/tls-auth
Add tls_auth_handler for push gateway
-
Add tls_auth_handler for push gateway
Support pushing metrics to a push gateway instance running with TLS Authentication. A user will need to provide the appropriate certificates to send to the server, and can specify additional parameters depending on their setup. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
Commits on Aug 19, 2022
-
updated README installation command (#833)
The command says pip install prometheus_client (underscore) but the steps above and PyPi says prometheus-client (dash) Signed-off-by: Alexa Griffith <agriffith96@gmail.com>
Commits on Aug 2, 2022
-
updated docs with code to remove default metrics
Signed-off-by: Sam Snarr <sssnarr1@gmail.com>
Commits on May 6, 2022
-
Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Commits on Apr 25, 2022
Commits on Apr 8, 2022
-
-
Merge pull request #796 from prometheus/revert-unintentional-breaking…
…-change Rename choose_formatter back to choose_encoder
-
Rename choose_formatter back to choose_encoder
Temporarily keep an alias so that choose_formatter will work for the 0.14.x release cycle. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
Commits on Apr 5, 2022
-
-
Merge pull request #774 from prometheus/disable-created-series
Disable exporting of _created metrics via env var
Commits on Mar 9, 2022
-
Simplify type annotations for number types (#781)
int values are acceptable to float variables: https://www.python.org/dev/peps/pep-0484/#the-numeric-tower Signed-off-by: Yiyang Zhan <pon.zhan@gmail.com>
-
Add support for gzip content-encoding (#776)
* Add support for gzip Content-Encoding Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com> * remove the case insensitive check for accept header Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com> * Add option to disable compression Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com> * sMake disable_compression an argument instead of env var Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com> * Update readme Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com> * Fix linters Signed-off-by: ivan-valkov <iv.v.valkov@gmail.com>
Commits on Feb 16, 2022
-
Disable exporting of _created metrics via env var
Users can disable the automatic creation of _created metrics by specifying the environment variable PROMETHEUS_DISABLE_CREATED_SERIES. This is controlled by an environment variable as an end user may not have control over which registry is being used/when metrics are created. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Correct minor typo in exception raised when exemplar labels too long (#…
…773) Signed-off-by: Rob Skillington <rob@chronosphere.io>
Commits on Feb 11, 2022
-
Add type annotations to everything referenced in __init__.py (#771)
* Type public functions in exposition.py * Typing in registry.py and metrics.py * Update built in collectors to use the new Abstract Base Class * Add typing to metrics_core.py * Add type annotations to samples.py * Sample values can be int as well as float * Support two or three element tuples in HistogramMetricFamily * Add typing to Graphite bridge Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
Commits on Feb 1, 2022
-
Add typing to Histogram/Summary/Gauge (#759)
* Add typing to Histogram * Add typing to Gauge/Summary * Ditch default value * Fix review comments Signed-off-by: Yury Pliner <yury.pliner@gmail.com>
Commits on Jan 28, 2022
-
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Relax type constraints Timestamp
Timestamps in samples or exemplars can be floats or Timestamp objects. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Add missing functions/classes to __all__ (#757)
* Add CollectorRegistry®ISTRY to __init__.py * Set implicit_reexport to False * Add functions/classes to __all__ * Add __all__ to exposition.py prometheus_client/__init__.py:7: error: Module "prometheus_client.exposition" does not explicitly export attribute "make_asgi_app"; implicit reexport disabled Signed-off-by: Yury Pliner <yury.pliner@gmail.com>
Commits on Jan 26, 2022
-
Use Iterable[Sample] for all sample collection
This makes sure the types are all consistent and use the appropriate NamedTuple. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Add mypy linting to the CI pipeline
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Allow labelvalues and labelkwargs to be Any type
We will cast all labelvalues to be strings so we should not force a user to cast to a string before passing the label. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
Commits on Jan 25, 2022
Commits on Jan 18, 2022
-
Change to imports to fix go-to-declaration in editors (#747)
* Convert assignments to imports Signed-off-by: Angus Holder <aholder97@gmail.com> * Run isort Signed-off-by: Angus Holder <aholder97@gmail.com> * Suppress flake8 warning about unused imports in __init__.py - they're the entrypoint of the library! Signed-off-by: Angus Holder <aholder97@gmail.com>
Commits on Dec 15, 2021
-
Allow to add labels inside a context manager (#730)
* Allow to add labels inside a context manager This way labels that depend on the result of the measured operation can be added more conveniently, e.g. the status code of an http request: from prometheus_client import Histogram from requests import get teapot = Histogram('teapot', 'A teapot', ['status']) with teapot.time() as metric: response = get('https://httpbin.org/status/418') metric.labels(status=response.status_code) Signed-off-by: Andreas Zeidler <andreas.zeidler@zeit.de> * Also allow to add deferred labels for 'gauge' and 'summary' metrics For this to work the 'observability' check needs to be deferred as well, in case a label is added inside the context manager thereby making the metric observable. Signed-off-by: Andreas Zeidler <andreas.zeidler@zeit.de> * Pass metric instance and callback name to `Timer` This should make the code slightly more readable. Signed-off-by: Andreas Zeidler <andreas.zeidler@zeit.de> * Remove redundant check for observability The callbacks are already taking care of this anyway. Signed-off-by: Andreas Zeidler <andreas.zeidler@zeit.de>
Commits on Dec 1, 2021
-
CI must not have run properly on the typing PR and there are several build/lint errors. Generally add spaces around = when types are used, and only import Literal if using Python 3.8 or later. Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
-
Annotate few functions and methods (#705)
Signed-off-by: Derek Kulinski <d@kulinski.us>
Commits on Nov 18, 2021
-
Catch non-integer bucket/count values. (#726)
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>