micrometer-metrics/micrometer

Refinement/Clarification of LongTaskTimer when using Prometheus

クローズ

#6,507 opened on 2025/07/03

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,133 件のフォーク)batch import
doc-updatehelp wantedregistry: prometheus

Repository metrics

Stars
 (4,882 個のスター)
PR merge metrics
 (平均マージ 1d 21h) (30d で 100 merged PRs)

説明

Please describe the feature request

Following a question in Slack with @shakuzen https://micrometer-metrics.slack.com/archives/C662HUJC9/p1751460825070189

The Migration to Prometheus 1.x client libs in micrometer 1.13. changed the behaviour for LongTaskTimer.

Specifically in said Slack thread it was concluded that:

  • The migration guide could be more precise in outlining two distinct changes
    • Histogram -> GaugeHistogram for LongTaskTimers with histogram buckets.
    • No more active or duration suffix. _active_count -> _count or _gcount, _duration_sum -> _sum or _gsum
  • The docs for LongTaskTimer or Micrometer Prometheus docs don't make it clear that .publishPercentileHistogram() might be necessary for certain use cases
  • Consider making all LongTaskTimers produce HistogramGauges and ditch Summary due to the semantic mismatch

コントリビューターガイド