Skip to content

Upgrading prometheus-client 0.21 to 0.22

Breaking0.21.1 → 0.22.1Platform2New3Fixed7Other6

BreakingUpgrade verdict

2 platform requirement changes.

  • Python 3.8 is no longer supported; use a newer Python version.
  • The library now runs on Python 3.13.
2 items need code or config changes

Python requirement changed in 0.22.0: >=3.8 → >=3.9.

Platform2
Removes Python 3.8 support.
Adds support for Python 3.13.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: export BucketSpan
  • added: export NativeHistogram
  • removed: variable METRIC_LABEL_NAME_RE
  • removed: variable METRIC_NAME_RE
  • removed: variable RESERVED_METRIC_LABEL_NAME_RE
  • changed: constructor CounterMetricFamily(name: str, documentation: str, value: Optional[float]=…, labels: Optional[Sequence[str]]=…, created: Optional[float]=…, unit: str=…) → constructor CounterMetricFamily(name: str, documentation: str, value: Optional[float]=…, labels: Optional[Sequence[str]]=…, created: Optional[float]=…, unit: str=…, exemplar: Optional[Exemplar]=…)
  • changed: method CounterMetricFamily.add_metric(labels: Sequence[str], value: float, created: Optional[float]=…, timestamp: Optional[Union[Timestamp, float]]=…) -> None → method CounterMetricFamily.add_metric(labels: Sequence[str], value: float, created: Optional[float]=…, timestamp: Optional[Union[Timestamp, float]]=…, exemplar: Optional[Exemplar]=…) -> None
  • changed: method Metric.add_sample(name: str, labels: Dict[str, str], value: float, timestamp: Optional[Union[Timestamp, float]]=…, exemplar: Optional[Exemplar]=…) -> None → method Metric.add_sample(name: str, labels: Dict[str, str], value: float, timestamp: Optional[Union[Timestamp, float]]=…, exemplar: Optional[Exemplar]=…, native_histogram: Optional[NativeHistogram]=…) -> None
  • added: function escape_label_name(s: str) -> str
  • added: function escape_metric_name(s: str) -> str
  • added: function parse_labels(labels_string: str, openmetrics: bool=…) -> Dict[str, str]
  • added: class BucketSpan(NamedTuple)
  • added: class NativeHistogram(NamedTuple)
  • added: field BucketSpan.length: int
  • added: field BucketSpan.offset: int
  • added: field NativeHistogram.count_value: float
  • added: field NativeHistogram.neg_deltas: Optional[Sequence[int]]
  • added: field NativeHistogram.neg_spans: Optional[Sequence[BucketSpan]]
  • added: field NativeHistogram.pos_deltas: Optional[Sequence[int]]
  • added: field NativeHistogram.pos_spans: Optional[Sequence[BucketSpan]]
  • added: field NativeHistogram.schema: int
  • added: field NativeHistogram.sum_value: float
  • added: field NativeHistogram.zero_count: float
  • added: field NativeHistogram.zero_threshold: float
  • added: field Sample.native_histogram: Optional[NativeHistogram]
  • added: function disable_legacy_validation()
  • added: function enable_legacy_validation()
  • added: function get_legacy_validation() -> bool
  • added: variable METRIC_LABEL_NAME_RE
  • added: variable METRIC_NAME_RE
  • added: variable RESERVED_METRIC_LABEL_NAME_RE