prometheus v3.1.0-rc.0 版本更新介绍
发布日期: 2024-12-20
版本号: v3.1.0-rc.0
本次更新主要涉及安全修复、功能变更、性能优化及错误修复。安全方面升级了golang.org/x/crypto依赖以解决CVE-2024-45337漏洞。功能调整包括通知器错误计数方式由批量统计改为按实际警报数量统计、API规则组字段重命名等。新增功能包含OTLP保留目标信息属性、规则组无限滚动分页、标签存储空间计算优化等。性能优化涉及TSDB索引缓存、正则匹配效率提升、远程写入内存分配缩减等多项改进。错误修复重点解决了PromQL函数对直方图处理异常、远程写入崩溃、经典直方图配置失效、数据损坏等关键问题,并修正了指标名称显示、时间函数兼容性等细节缺陷。
更新内容 (中文)
- [安全] 升级 golang.org/x/crypto 以解决报告的 CVE-2024-45337 漏洞。#15691
- [变更] Notifier: 按受影响的告警数量而非批次递增 prometheus_notifications_errors_total。#15428
- [变更] API: 规则列表字段 “groupNextToken:omitempty” 重命名为 “groupNextToken”。#15400
- [增强] OTLP 转换: 在 target_info 中保留标识属性。#15448
- [增强] 分页规则组,支持组内规则无限滚动。#15677
- [增强] TSDB: 优化标签占用空间的计算。#13880
- [增强] Rules: 新增指标 rule_group_last_rule_duration_sum_seconds。#15672
- [增强] 可观测性: 导出 ‘go_sync_mutex_wait_total_seconds_total’ 指标。#15339
- [增强] Remote-Write: 可选使用随机选择 IP 的 DNS 解析器。#15329
- [性能] 优化
l=~\".+\"
匹配器。#15474, #15684 - [性能] TSDB: 在压缩时缓存所有符号。#15455
- [性能] TSDB: MemPostings 保留标签值切片的映射。#15426
- [性能] Remote-Write: 移除 interning 钩子。#15456
- [性能] Scrape: 优化自定义桶实验性原生直方图的字符串操作。#15453
- [性能] TSDB: 减少内存分配。#15465, #15427
- [性能] Storage: 在 mergeGenericQuerier 中实现限制。#14489
- [性能] TSDB: 优化反向匹配。#14144
- [性能] Regex: 使用栈内存存储字符串的小写副本。#15210
- [性能] TSDB: 删除索引时暂停解锁以允许读取。#15242
- [修复] Rules: 若依赖关系不确定则不并发执行规则。#15560
- [修复] PromQL: 为
absent
、absent_over_time
和deriv
函数添加直方图测试。#15667 - [修复] PromQL: 修复 UTF-8 字符引号相关错误。#15531
- [修复] Scrape: 修复重载后 nil panic。#15563
- [修复] Remote-write: 修复重复日志消息导致的 panic。#15562
- [修复] Scrape: 重载时忽略 always_scrape_classic_histograms 和 convert_classic_histograms_to_nhcb 配置。#15489
- [修复] TSDB: 修复实验性原生直方图的数据损坏问题。#15482
- [修复] PromQL: 在所有时间相关函数中忽略直方图。#15479
- [修复] OTLP 接收器: 转换指标元数据。#15416
- [修复] PromQL: 修复直方图的
resets
函数。#15527 - [修复] PromQL: 修复混合直方图与浮点数的
changes()
行为。#15469 - [修复] PromQL: 修复部分聚合操作对直方图的行为。#15432
- [修复] 允许在 openmetrics 文本格式中使用带引号的样本键。#15260
- [修复] TSDB: 修复加载写后日志 (WBL) 的罕见条件问题。#15380
- [修复]
round()
函数未移除__name__
标签。#15250 - [修复] Promtool: 分析块显示指标名称的基数为 0。#15438
- [修复] PromQL: 修复直方图的
count_values
行为。#15422 - [修复] PromQL: 修复含
bool
修饰符的对比二元操作与原生直方图的兼容性问题。#15413 - [修复] PromQL: 修复错误的“聚合中忽略原生直方图”注释。#15414
- [修复] PromQL: 修正部分运算符和聚合器对原生直方图的行为。#15245
- [修复] TSDB: 非计量直方图块的首个样本始终返回未知提示。#15343
- [修复] PromQL: Clamp 函数忽略含原生直方图的数据点。#15169
- [修复] TSDB: 修复 headAppender 中陈旧值的竞态问题。#15322
- [修复] UI: 修复空指标名的选择器/序列格式化问题。#15340
更新内容 (原始)
- [SECURITY] upgrade golang.org/x/crypto to address reported CVE-2024-45337. #15691
- [CHANGE] Notifier: Increment prometheus_notifications_errors_total by the number of affected alerts rather than per batch. #15428
- [CHANGE] API: list rules field “groupNextToken:omitempty” renamed to “groupNextToken”. #15400
- [ENHANCEMENT] OTLP translate: keep identifying attributes in target_info. #15448
- [ENHANCEMENT] Paginate rule groups, add infinite scroll to rules within groups. #15677
- [ENHANCEMENT] TSDB: Improve calculation of space used by labels. #13880
- [ENHANCEMENT] Rules: new metric rule_group_last_rule_duration_sum_seconds. #15672
- [ENHANCEMENT] Observability: Export ‘go_sync_mutex_wait_total_seconds_total’ metric. #15339
- [ENHANCEMEN] Remote-Write: optionally use a DNS resolver that picks a random IP. #15329
- [PERF] Optimize
l=~".+"
matcher. #15474, #15684 - [PERF] TSDB: Cache all symbols for compaction . #15455
- [PERF] TSDB: MemPostings: keep a map of label values slices. #15426
- [PERF] Remote-Write: Remove interning hook. #15456
- [PERF] Scrape: optimize string manipulation for experimental native histograms with custom buckets. #15453
- [PERF] TSDB: reduce memory allocations. #15465, #15427
- [PERF] Storage: Implement limit in mergeGenericQuerier. #14489
- [PERF] TSDB: Optimize inverse matching. #14144
- [PERF] Regex: use stack memory for lowercase copy of string. #15210
- [PERF] TSDB: When deleting from postings index, pause to unlock and let readers read. #15242
- [BUGFIX] Rules: Do not run rules concurrently if uncertain about dependencies. #15560
- [BUGFIX] PromQL: Adds test for
absent
,absent_over_time
andderiv
func with histograms. #15667 - [BUGFIX] PromQL: Fix various bugs related to quoting UTF-8 characters. #15531
- [BUGFIX] Scrape: fix nil panic after scrape loop reload. #15563
- [BUGFIX] Remote-write: fix panic on repeated log message. #15562
- [BUGFIX] Scrape: reload would ignore always_scrape_classic_histograms and convert_classic_histograms_to_nhcb configs. #15489
- [BUGFIX] TSDB: fix data corruption in experimental native histograms. #15482
- [BUGFIX] PromQL: Ignore histograms in all time related functions. #15479
- [BUGFIX] OTLP receiver: Convert metric metadata. #15416
- [BUGFIX] PromQL: Fix
resets
function for histograms. #15527 - [BUGFIX] PromQL: Fix behaviour of
changes()
for mix of histograms and floats. #15469 - [BUGFIX] PromQL: Fix behaviour of some aggregations with histograms. #15432
- [BUGFIX] allow quoted exemplar keys in openmetrics text format. #15260
- [BUGFIX] TSDB: fixes for rare conditions when loading write-behind-log (WBL). #15380
- [BUGFIX]
round()
function did not remove__name__
label. #15250 - [BUGFIX] Promtool: analyze block shows metric name with 0 cardinality. #15438
- [BUGFIX] PromQL: Fix
count_values
for histograms. #15422 - [BUGFIX] PromQL: fix issues with comparison binary operations with
bool
modifier and native histograms. #15413 - [BUGFIX] PromQL: fix incorrect “native histogram ignored in aggregation” annotations. #15414
- [BUGFIX] PromQL: Corrects the behaviour of some operator and aggregators with Native Histograms. #15245
- [BUGFIX] TSDB: Always return unknown hint for first sample in non-gauge histogram chunk. #15343
- [BUGFIX] PromQL: Clamp functions: Ignore any points with native histograms. #15169
- [BUGFIX] TSDB: Fix race on stale values in headAppender. #15322
- [BUGFIX] UI: Fix selector / series formatting for empty metric names. #15340
下载链接
- prometheus-3.1.0-rc.0.darwin-amd64.tar.gz
- prometheus-3.1.0-rc.0.darwin-arm64.tar.gz
- prometheus-3.1.0-rc.0.dragonfly-amd64.tar.gz
- prometheus-3.1.0-rc.0.freebsd-386.tar.gz
- prometheus-3.1.0-rc.0.freebsd-amd64.tar.gz
- prometheus-3.1.0-rc.0.freebsd-arm64.tar.gz
- prometheus-3.1.0-rc.0.freebsd-armv6.tar.gz
- prometheus-3.1.0-rc.0.freebsd-armv7.tar.gz
- prometheus-3.1.0-rc.0.illumos-amd64.tar.gz
- prometheus-3.1.0-rc.0.linux-386.tar.gz
- prometheus-3.1.0-rc.0.linux-amd64.tar.gz
- prometheus-3.1.0-rc.0.linux-arm64.tar.gz
- prometheus-3.1.0-rc.0.linux-armv5.tar.gz
- prometheus-3.1.0-rc.0.linux-armv6.tar.gz
- prometheus-3.1.0-rc.0.linux-armv7.tar.gz
- prometheus-3.1.0-rc.0.linux-mips.tar.gz
- prometheus-3.1.0-rc.0.linux-mips64.tar.gz
- prometheus-3.1.0-rc.0.linux-mips64le.tar.gz
- prometheus-3.1.0-rc.0.linux-mipsle.tar.gz
- prometheus-3.1.0-rc.0.linux-ppc64.tar.gz
- prometheus-3.1.0-rc.0.linux-ppc64le.tar.gz
- prometheus-3.1.0-rc.0.linux-riscv64.tar.gz
- prometheus-3.1.0-rc.0.linux-s390x.tar.gz
- prometheus-3.1.0-rc.0.netbsd-386.tar.gz
- prometheus-3.1.0-rc.0.netbsd-amd64.tar.gz
- prometheus-3.1.0-rc.0.netbsd-arm64.tar.gz
- prometheus-3.1.0-rc.0.netbsd-armv6.tar.gz
- prometheus-3.1.0-rc.0.netbsd-armv7.tar.gz
- prometheus-3.1.0-rc.0.windows-386.tar.gz
- prometheus-3.1.0-rc.0.windows-386.zip
- prometheus-3.1.0-rc.0.windows-amd64.tar.gz
- prometheus-3.1.0-rc.0.windows-amd64.zip
- prometheus-3.1.0-rc.0.windows-arm64.tar.gz
- prometheus-3.1.0-rc.0.windows-arm64.zip
- prometheus-web-ui-3.1.0-rc.0.tar.gz
- sha256sums.txt