prometheus v3.9.0 版本更新介绍
发布日期: 2026-01-07
版本号: v3.9.0
在 Prometheus 3.9 版本中,Native Histograms 功能已不再是实验性功能,原有的
native-histogram特性标志现已无效。用户需要改用scrape_native_histograms配置选项来采集 Native Histogram 样本。此版本的更新主要包括:变更了 Native Histograms 的启用方式;为 TSDB 状态接口添加了统计集数量上限;新增了客户端功能查询接口与 Promtool 测试功能;优化了存储、抓取、查询和通知等多方面的性能与功能,例如支持自定义刷新间隔、改进抓取性能、完善直方图处理等;同时修复了大量关于 PromQL 查询、UI 显示、TSDB 存储和远程读写中的错误。
更新内容 (中文)
Native Histograms 用户须知
在 3.9 版本中,Native Histograms 不再处于实验阶段,且 native-histogram 功能标志已失效。您现在必须启用配置项 scrape_native_histograms 才能从导出器收集 Native Histogram 样本。
更新日志
- [CHANGE] Native Histograms 不再是实验性功能!
native-histogram功能标志现已成为无效选项。请改用scrape_native_histograms配置选项。#17528 - [CHANGE] API:为 TSDB 状态端点添加最多 10,000 组统计数据的上限。#17647
- [FEATURE] API:新增
/api/v1/features端点,供客户端了解所支持的功能。#17427 - [FEATURE] Promtool:为单元测试添加
start_timestamp字段。#17636 - [FEATURE] Promtool:在
tsdb dump命令中新增--format seriesjson选项,以 JSON 格式仅输出序列标签。#13409 - [FEATURE] 新增
--storage.tsdb.delay-compact-file.path标志,以增强与 Thanos 的互操作性。#17435 - [FEATURE] UI:在查询下拉菜单中添加复制该查询面板的选项。#17714
- [ENHANCEMENT] TSDB:新增
--storage.tsdb.block-reload-interval标志,用于配置 TSDB 数据块重新加载间隔。#16728 - [ENHANCEMENT] UI:在图表选项中添加从零开始显示 Y 轴的功能。#17565
- [ENHANCEMENT] 采集:经典 protobuf 格式不再要求指标名称中包含单位。#16834
- [ENHANCEMENT] PromQL、规则、服务发现、采集:为现有摘要类型添加原生直方图以作补充。#17374
- [ENHANCEMENT] 通知:添加直方图
prometheus_notifications_latency_histogram_seconds以补充现有摘要指标。#16637 - [ENHANCEMENT] 远程写入:为 AzureAD 认证添加自定义作用域支持。#17483
- [ENHANCEMENT] 服务发现:为大多数
prometheus_sd_refresh指标添加包含作业名称的config标签。#17138 - [ENHANCEMENT] TSDB:新增直方图
prometheus_tsdb_sample_ooo_delta,用于统计以秒为单位的乱序样本分布情况。该指标将收集所有样本(无论是否被接受)。#17477 - [ENHANCEMENT] 远程读取:验证通过远程读取接收的直方图数据。#17561
- [PERF] TSDB:对倒排索引进行小幅优化。#17439
- [PERF] 采集:加速序列的重打标处理。#17530
- [PERF] PromQL:对二元运算符进行小幅优化。#17524、#17519
- [BUGFIX] UI:PromQL 自动补现已能为样本以
_total结尾的 OpenMetrics 计数器显示正确的类型和 HELP 文本。#17682 - [BUGFIX] UI:修复 codemirror-promql 在向量选择器右花括号后错误显示标签补全建议的问题。#17602
- [BUGFIX] UI:查询编辑器不再在数字后已有时长单位时重复建议单位。#17605
- [BUGFIX] PromQL:修复在启用实验性延迟名称删除时可能出现的 “向量不能包含具有相同标签集的指标” 错误。#17678
- [BUGFIX] PromQL:修复当查询包含空
ignoring()和非空分组时可能损坏 PromQL 文本的问题。#17643 - [BUGFIX] PromQL:修复锚定选择器在所有样本超出范围时
resets/changes返回空结果的问题。#17479 - [BUGFIX] PromQL:在过滤二元运算符中更一致地检查多对一匹配。#17668
- [BUGFIX] PromQL:修复一元取反与不重叠序列时的冲突问题。#17708
- [BUGFIX] PromQL:修复
label_join和label_replace与不重叠序列时的冲突问题。#17703 - [BUGFIX] PromQL:修复在启用实验性延迟名称删除时,使用 OR 表达式查询可能返回不一致结果的问题。#17161
- [BUGFIX] PromQL:确保对直方图执行
rate/increase/delta操作后得到的是仪表盘直方图。#17608 - [BUGFIX] PromQL:修复遍历无效直方图时可能发生的 panic 问题。#17559
- [BUGFIX] TSDB:拒绝编码数据块长度溢出整数类型的块文件。#17533
- [BUGFIX] TSDB:修复在解析无效直方图的周期降级时可能发生的 panic 问题。#17561
- [BUGFIX] 远程写入接收端:在启用实验性类型与单位标签功能时,避免标签重复。#17546
- [BUGFIX] OTLP 接收端:仅在启用实验性元数据 WAL 记录功能时才将元数据写入磁盘。#17472
更新内容 (原始)
Note for users of Native Histograms
In version 3.9, Native Histograms is no longer experimental, and the feature flag native-histogram has no effect. You must now turn on
the config setting scrape_native_histograms to collect Native Histogram samples from exporters.
Changelog
- [CHANGE] Native Histograms are no longer experimental! Make the
native-histogramfeature flag a no-op. Usescrape_native_histogramsconfig option instead. #17528 - [CHANGE] API: Add maximum limit of 10,000 sets of statistics to TSDB status endpoint. #17647
- [FEATURE] API: Add /api/v1/features for clients to understand which features are supported. #17427
- [FEATURE] Promtool: Add
start_timestampfield for unit tests. #17636 - [FEATURE] Promtool: Add
--format seriesjsonoption totsdb dumpto output just series labels in JSON format. #13409 - [FEATURE] Add
--storage.tsdb.delay-compact-file.pathflag for better interoperability with Thanos. #17435 - [FEATURE] UI: Add an option on the query drop-down menu to duplicate that query panel. #17714
- [ENHANCEMENT]: TSDB: add flag
--storage.tsdb.block-reload-intervalto configure TSDB Block Reload Interval. #16728 - [ENHANCEMENT] UI: Add graph option to start the chart’s Y axis at zero. #17565
- [ENHANCEMENT] Scraping: Classic protobuf format no longer requires the unit in the metric name. #16834
- [ENHANCEMENT] PromQL, Rules, SD, Scraping: Add native histograms to complement existing summaries. #17374
- [ENHANCEMENT] Notifications: Add a histogram
prometheus_notifications_latency_histogram_secondsto complement the existing summary. #16637 - [ENHANCEMENT] Remote-write: Add custom scope support for AzureAD authentication. #17483
- [ENHANCEMENT] SD: add a
configlabel with job name for mostprometheus_sd_refreshmetrics. #17138 - [ENHANCEMENT] TSDB: New histogram
prometheus_tsdb_sample_ooo_delta, the distribution of out-of-order samples in seconds. Collected for all samples, accepted or not. #17477 - [ENHANCEMENT] Remote-read: Validate histograms received via remote-read. #17561
- [PERF] TSDB: Small optimizations to postings index. #17439
- [PERF] Scraping: Speed up relabelling of series. #17530
- [PERF] PromQL: Small optimisations in binary operators. #17524, #17519.
- [BUGFIX] UI: PromQL autocomplete now shows the correct type and HELP text for OpenMetrics counters whose samples end in
_total. #17682 - [BUGFIX] UI: Fixed codemirror-promql incorrectly showing label completion suggestions after the closing curly brace of a vector selector. #17602
- [BUGFIX] UI: Query editor no longer suggests a duration unit if one is already present after a number. #17605
- [BUGFIX] PromQL: Fix some “vector cannot contain metrics with the same labelset” errors when experimental delayed name removal is enabled. #17678
- [BUGFIX] PromQL: Fix possible corruption of PromQL text if the query had an empty
ignoring()and non-empty grouping. #17643 - [BUGFIX] PromQL: Fix resets/changes to return empty results for anchored selectors when all samples are outside the range. #17479
- [BUGFIX] PromQL: Check more consistently for many-to-one matching in filter binary operators. #17668
- [BUGFIX] PromQL: Fix collision in unary negation with non-overlapping series. #17708
- [BUGFIX] PromQL: Fix collision in label_join and label_replace with non-overlapping series. #17703
- [BUGFIX] PromQL: Fix bug with inconsistent results for queries with OR expression when experimental delayed name removal is enabled. #17161
- [BUGFIX] PromQL: Ensure that
rate/increase/deltaof histograms results in a gauge histogram. #17608 - [BUGFIX] PromQL: Do not panic while iterating over invalid histograms. #17559
- [BUGFIX] TSDB: Reject chunk files whose encoded chunk length overflows int. #17533
- [BUGFIX] TSDB: Do not panic during resolution reduction of invalid histograms. #17561
- [BUGFIX] Remote-write Receive: Avoid duplicate labels when experimental type-and-unit-label feature is enabled. #17546
- [BUGFIX] OTLP Receiver: Only write metadata to disk when experimental metadata-wal-records feature is enabled. #17472
下载链接
- prometheus-3.9.0.darwin-amd64.tar.gz
- prometheus-3.9.0.darwin-arm64.tar.gz
- prometheus-3.9.0.dragonfly-amd64.tar.gz
- prometheus-3.9.0.freebsd-386.tar.gz
- prometheus-3.9.0.freebsd-amd64.tar.gz
- prometheus-3.9.0.freebsd-arm64.tar.gz
- prometheus-3.9.0.freebsd-armv6.tar.gz
- prometheus-3.9.0.freebsd-armv7.tar.gz
- prometheus-3.9.0.illumos-amd64.tar.gz
- prometheus-3.9.0.linux-386.tar.gz
- prometheus-3.9.0.linux-amd64.tar.gz
- prometheus-3.9.0.linux-arm64.tar.gz
- prometheus-3.9.0.linux-armv5.tar.gz
- prometheus-3.9.0.linux-armv6.tar.gz
- prometheus-3.9.0.linux-armv7.tar.gz
- prometheus-3.9.0.linux-mips.tar.gz
- prometheus-3.9.0.linux-mips64.tar.gz
- prometheus-3.9.0.linux-mips64le.tar.gz
- prometheus-3.9.0.linux-mipsle.tar.gz
- prometheus-3.9.0.linux-ppc64.tar.gz
- prometheus-3.9.0.linux-ppc64le.tar.gz
- prometheus-3.9.0.linux-riscv64.tar.gz
- prometheus-3.9.0.linux-s390x.tar.gz
- prometheus-3.9.0.netbsd-386.tar.gz
- prometheus-3.9.0.netbsd-amd64.tar.gz
- prometheus-3.9.0.netbsd-arm64.tar.gz
- prometheus-3.9.0.netbsd-armv6.tar.gz
- prometheus-3.9.0.netbsd-armv7.tar.gz
- prometheus-3.9.0.windows-386.tar.gz
- prometheus-3.9.0.windows-386.zip
- prometheus-3.9.0.windows-amd64.tar.gz
- prometheus-3.9.0.windows-amd64.zip
- prometheus-3.9.0.windows-arm64.tar.gz
- prometheus-3.9.0.windows-arm64.zip
- prometheus-web-ui-3.9.0.tar.gz
- sha256sums.txt