Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vokracko/client_python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: prometheus/client_python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 8 files changed
  • 2 contributors

Commits on Apr 24, 2026

  1. Expose measured duration on Timer context manager (prometheus#1166)

    Assigning the .time() context manager (with ... as t) now yields a Timer
    whose .duration attribute holds the observed value in seconds after the
    block exits. This lets callers reuse the measurement (logging, further
    metrics) without calling default_timer() a second time.
    
    Signed-off-by: Lukáš Vokráčko <lukas@vokracko.cz>
    vokracko authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    e75a74f View commit details
    Browse the repository at this point in the history
  2. docs: add API reference for CollectorRegistry and custom collector cl…

    …asses (prometheus#1169)
    
    Closes prometheus#1163
    
    collector/custom.md: Collector protocol section (collect/describe), value vs
    labels mutual exclusivity note, full constructor and add_metric tables for
    GaugeMetricFamily, CounterMetricFamily, SummaryMetricFamily,
    HistogramMetricFamily, and InfoMetricFamily, plus a runnable real-world example.
    
    collector/_index.md: constructor parameter tables for ProcessCollector,
    PlatformCollector, and GCCollector, with exported metrics listed for each.
    
    registry/_index.md (new): CollectorRegistry constructor and all public methods
    (register, unregister, collect, restricted_registry, get_sample_value,
    set_target_info, get_target_info), the global REGISTRY instance, and examples
    for isolated registry usage and registry=None.
    
    All code examples verified by running them in Python.
    
    Signed-off-by: k1chik <107162115+k1chik@users.noreply.github.com>
    k1chik authored Apr 24, 2026
    Configuration menu
    Copy the full SHA
    482656c View commit details
    Browse the repository at this point in the history
Loading