prometheus v2.55.0 版本更新介绍
发布日期: 2024-10-22
版本号: v2.55.0
本次Prometheus更新主要包含以下内容:新增多项实验性功能,包括PromQL的
info
函数、支持UTF-8标签名的utf8-names
功能标志、抓取配置中自定义HTTP头设置能力、OpenMetrics的零值时间戳功能等。优化方面,改进了OTLP接收器的资源属性转换逻辑、远程读取流式传输支持、PromQL的标签删除延迟机制及数值精度算法。性能提升着重于TSDB对顺序与非顺序时序数据的混合查询效率。错误修复涉及服务发现模块的目标管理问题、远程写入元数据异常、直方图数据处理错误等。此外,API现支持多监听地址,工具链新增标签添加和测试报告格式选项。本次版本还迎来9位新贡献者的首次代码提交。
更新内容 (中文)
更新内容
- [功能] PromQL: 新增实验性
info
函数 #14495 - [功能] 支持标签名称使用 UTF-8 字符 - 特性标志
utf8-names
#14482 #14880 #14736 #14727 - [功能] 抓取: 新增配置中设置自定义
http_headers
的能力 #14817 - [功能] 抓取: OpenMetrics 中支持特性标志
created-timestamp-zero-ingestion
#14356 #14815 - [功能] 抓取:
scrape_failure_log_file
选项可将抓取失败记录至文件 #14734 - [功能] OTLP 接收器: 资源属性可选提升为时序标签 #14200
- [功能] 远程写入: 支持 Google Cloud Monitoring 授权 #14346
- [功能] Promtool:
tsdb create-blocks
新增添加标签选项 #14403 - [功能] Promtool:
promtool test
新增--junit
结果格式化标志 #14506 - [功能] TSDB: 新增
delayed-compaction
特性标志用于多 Prometheus 实例运行时序压缩随机化 #12532 - [优化] OTLP 接收器: 对零计数但非零总和的指数直方图发出警告 #14706
- [优化] OTLP 接收器: 上下文取消/超时时中断转换流程 #14612
- [优化] 远程读取客户端: 若服务端支持则启用流式远程读取 #11379
- [优化] 远程写入: 若自上次更新后未成功发送样本则不进行分片重组 #14450
- [优化] PromQL: 将
__name__
标签删除延迟至查询评估最后阶段(实验性功能,需启用promql-delayed-name-removal
标志) #14477 - [优化] PromQL: 实验性函数
sort_by_label
和sort_by_label_desc
在标签相等时按所有标签排序 #14655 #14985 - [优化] PromQL: 明确查询评估期间发生 Go 运行时 panic 的错误日志信息 #14621
- [优化] PromQL: 使用 Kahan 求和算法提升
avg
和avg_over_time
计算精度 #14413 - [优化] 追踪: 改进 PromQL 追踪功能,展示聚合/运算符/函数调用操作 #14816
- [优化] API: 支持多监听地址 #14665
- [优化] TSDB: 与即将发布的索引 v3 版本保持向后兼容 #14934
- [性能] TSDB: 同时查询顺序与乱序时序 #14354 #14693 #14714 #14831 #14874 #14948 #15120
- [性能] TSDB: 优化重叠乱序头块读取流程 #14729
- [问题修复] PromQL: 确保
sort_by_label
排序稳定性 #14985 - [问题修复] 服务发现: 修复目标丢失问题(需启用
new-service-discovery-manager
特性标志) #13147 - [问题修复] 服务发现: 停止存储陈旧目标(需启用
new-service-discovery-manager
特性标志) #13622 - [问题修复] 抓取: protobuf 抓取可能丢弃样本范例的问题 #14810
- [问题修复] 远程写入: 修复实验性远程写入 V2 的元数据发送问题 #14766
- [问题修复] 远程写入: 当时序存在重复标签时返回 4xx 而非 5xx 错误 #14716
- [问题修复] 实验性原生直方图: 修复多个结果错误/panic/告警问题 #14513 #14575 #14598 #14609 #14611 #14771 #14821
- [问题修复] TSDB: 仅统计未知记录类型的
record_decode_failures_total
指标 #14042
新贡献者
- @maxamins 首次贡献于 https://github.com/prometheus/prometheus/pull/14346
- @cuiweiyuan 首次贡献于 https://github.com/prometheus/prometheus/pull/14626
- @harshitasao 首次贡献于 https://github.com/prometheus/prometheus/pull/14690
- @patilsuraj767 首次贡献于 https://github.com/prometheus/prometheus/pull/14403
- @riskrole 首次贡献于 https://github.com/prometheus/prometheus/pull/14751
- @jcreixell 首次贡献于 https://github.com/prometheus/prometheus/pull/14477
- @kevinrawal 首次贡献于 https://github.com/prometheus/prometheus/pull/14765
- @electron0zero 首次贡献于 https://github.com/prometheus/prometheus/pull/14650
- @shandongzhejiang 首次贡献于 https://github.com/prometheus/prometheus/pull/14700
完整更新日志: https://github.com/prometheus/prometheus/compare/v2.54.1...v2.55.0
更新内容 (原始)
What’s Changed
- [FEATURE] PromQL: Add experimental
info
function. #14495 - [FEATURE] Support UTF-8 characters in label names - feature flag
utf8-names
. #14482, #14880, #14736, #14727 - [FEATURE] Scraping: Add the ability to set custom
http_headers
in config. #14817 - [FEATURE] Scraping: Support feature flag
created-timestamp-zero-ingestion
in OpenMetrics. #14356, #14815 - [FEATURE] Scraping:
scrape_failure_log_file
option to log failures to a file. #14734 - [FEATURE] OTLP receiver: Optional promotion of resource attributes to series labels. #14200
- [FEATURE] Remote-Write: Support Google Cloud Monitoring authorization. #14346
- [FEATURE] Promtool:
tsdb create-blocks
new option to add labels. #14403 - [FEATURE] Promtool:
promtool test
adds--junit
flag to format results. #14506 - [FEATURE] TSDB: Add
delayed-compaction
feature flag, for people running many Prometheus to randomize timing. #12532 - [ENHANCEMENT] OTLP receiver: Warn on exponential histograms with zero count and non-zero sum. #14706
- [ENHANCEMENT] OTLP receiver: Interrupt translation on context cancellation/timeout. #14612
- [ENHANCEMENT] Remote Read client: Enable streaming remote read if the server supports it. #11379
- [ENHANCEMENT] Remote-Write: Don’t reshard if we haven’t successfully sent a sample since last update. #14450
- [ENHANCEMENT] PromQL: Delay deletion of
__name__
label to the end of the query evaluation. This is experimental and enabled under the feature-flagpromql-delayed-name-removal
. #14477 - [ENHANCEMENT] PromQL: Experimental
sort_by_label
andsort_by_label_desc
sort by all labels when label is equal. #14655, #14985 - [ENHANCEMENT] PromQL: Clarify error message logged when Go runtime panic occurs during query evaluation. #14621
- [ENHANCEMENT] PromQL: Use Kahan summation for better accuracy in
avg
andavg_over_time
. #14413 - [ENHANCEMENT] Tracing: Improve PromQL tracing, including showing the operation performed for aggregates, operators, and calls. #14816
- [ENHANCEMENT] API: Support multiple listening addresses. #14665
- [ENHANCEMENT] TSDB: Backward compatibility with upcoming index v3. #14934
- [PERF] TSDB: Query in-order and out-of-order series together. #14354, #14693, #14714, #14831, #14874, #14948, #15120
- [PERF] TSDB: Streamline reading of overlapping out-of-order head chunks. #14729
- [BUGFIX] PromQL: make sort_by_label stable. #14985
- [BUGFIX] SD: Fix dropping targets (with feature flag
new-service-discovery-manager
). #13147 - [BUGFIX] SD: Stop storing stale targets (with feature flag
new-service-discovery-manager
). #13622 - [BUGFIX] Scraping: exemplars could be dropped in protobuf scraping. #14810
- [BUGFIX] Remote-Write: fix metadata sending for experimental Remote-Write V2. #14766
- [BUGFIX] Remote-Write: Return 4xx not 5xx when timeseries has duplicate label. #14716
- [BUGFIX] Experimental Native Histograms: many fixes for incorrect results, panics, warnings. #14513, #14575, #14598, #14609, #14611, #14771, #14821
- [BUGFIX] TSDB: Only count unknown record types in
record_decode_failures_total
metric. #14042
New Contributors
- @maxamins made their first contribution in https://github.com/prometheus/prometheus/pull/14346
- @cuiweiyuan made their first contribution in https://github.com/prometheus/prometheus/pull/14626
- @harshitasao made their first contribution in https://github.com/prometheus/prometheus/pull/14690
- @patilsuraj767 made their first contribution in https://github.com/prometheus/prometheus/pull/14403
- @riskrole made their first contribution in https://github.com/prometheus/prometheus/pull/14751
- @jcreixell made their first contribution in https://github.com/prometheus/prometheus/pull/14477
- @kevinrawal made their first contribution in https://github.com/prometheus/prometheus/pull/14765
- @electron0zero made their first contribution in https://github.com/prometheus/prometheus/pull/14650
- @shandongzhejiang made their first contribution in https://github.com/prometheus/prometheus/pull/14700
Full Changelog: https://github.com/prometheus/prometheus/compare/v2.54.1...v2.55.0
下载链接
- prometheus-2.55.0.darwin-amd64.tar.gz
- prometheus-2.55.0.darwin-arm64.tar.gz
- prometheus-2.55.0.dragonfly-amd64.tar.gz
- prometheus-2.55.0.freebsd-386.tar.gz
- prometheus-2.55.0.freebsd-amd64.tar.gz
- prometheus-2.55.0.freebsd-arm64.tar.gz
- prometheus-2.55.0.freebsd-armv6.tar.gz
- prometheus-2.55.0.freebsd-armv7.tar.gz
- prometheus-2.55.0.illumos-amd64.tar.gz
- prometheus-2.55.0.linux-386.tar.gz
- prometheus-2.55.0.linux-amd64.tar.gz
- prometheus-2.55.0.linux-arm64.tar.gz
- prometheus-2.55.0.linux-armv5.tar.gz
- prometheus-2.55.0.linux-armv6.tar.gz
- prometheus-2.55.0.linux-armv7.tar.gz
- prometheus-2.55.0.linux-mips.tar.gz
- prometheus-2.55.0.linux-mips64.tar.gz
- prometheus-2.55.0.linux-mips64le.tar.gz
- prometheus-2.55.0.linux-mipsle.tar.gz
- prometheus-2.55.0.linux-ppc64.tar.gz
- prometheus-2.55.0.linux-ppc64le.tar.gz
- prometheus-2.55.0.linux-riscv64.tar.gz
- prometheus-2.55.0.linux-s390x.tar.gz
- prometheus-2.55.0.netbsd-386.tar.gz
- prometheus-2.55.0.netbsd-amd64.tar.gz
- prometheus-2.55.0.netbsd-arm64.tar.gz
- prometheus-2.55.0.netbsd-armv6.tar.gz
- prometheus-2.55.0.netbsd-armv7.tar.gz
- prometheus-2.55.0.windows-386.tar.gz
- prometheus-2.55.0.windows-386.zip
- prometheus-2.55.0.windows-amd64.tar.gz
- prometheus-2.55.0.windows-amd64.zip
- prometheus-2.55.0.windows-arm64.tar.gz
- prometheus-2.55.0.windows-arm64.zip
- prometheus-web-ui-2.55.0.tar.gz
- sha256sums.txt