prometheus v3.11.0 版本更新介绍
发布日期: 2026-04-02
版本号: v3.11.0
Prometheus 本次更新包含多项重要变更与改进。Hetzner 服务发现中,
__meta_hetzner_datacenter标签对robot角色已弃用但仍保留以实现向后兼容,建议改用__meta_hetzner_robot_datacenter;对hcloud角色该标签已弃用并将于 2026 年 7 月 1 日后停止工作,同时__meta_hetzner_hcloud_datacenter_location及__meta_hetzner_hcloud_datacenter_location_network_zone标签也已弃用,请分别使用__meta_hetzner_hcloud_location和__meta_hetzner_hcloud_location_network_zone。Promtool 的调试输出已重定向至 stderr 以避免干扰标准输出。新增 AWS 服务发现的 Elasticache 和 RDS 角色,Azure 服务发现新增 Workload Identity 认证方式支持,并引入prometheus_sd_last_update_timestamp_seconds指标用于跟踪服务发现最后更新时间。Kubernetes 服务发现新增对 Pod 角色选择器以及部署、定时任务和 Job 控制器名称相关标签的支持。PromQL 新增用于裁剪原生直方图观测值的</与>/操作符,以及实验性的histogram_quantiles多分位数计算函数。TSDB 新增storage.tsdb.retention.percentage配置项,并引入实验性st-storage与xor2-encoding功能标志,分别用于存储起始时间戳和优化浮点采样编码。性能方面,优化了 PromQL 连接运算、远程写 WAL 监控、TSDB 标签值匹配及 UI 堆叠图表。修复了 AWS EC2 服务发现端点配置、内存泄漏、警报状态重置、Kubernetes 服务发现重复目标、OTLP 直方图处理、PromQL 直方图查询、远程写测量时机、规则标签模板解析、UI 工具提示偏移以及 TSDB 存储与配置读取等多项问题。
更新内容 (中文)
- [变更] Hetzner 服务发现:
__meta_hetzner_datacenter标签在robot角色中已弃用,为保持向后兼容性保留,请改用__meta_hetzner_robot_datacenter标签。对于hcloud角色,该标签已弃用,将于 2026 年 7 月 1 日后停止工作。 #17850 - [变更] Hetzner 服务发现:
__meta_hetzner_hcloud_datacenter_location和__meta_hetzner_hcloud_datacenter_location_network_zone标签已弃用,请改用__meta_hetzner_hcloud_location和__meta_hetzner_hcloud_location_network_zone标签。 #17850 - [变更] Promtool:将调试输出重定向到 stderr,以避免干扰基于标准输出的工具输出。 #18346
- [特性] AWS 服务发现:新增 Elasticache 角色。 #18099
- [特性] AWS 服务发现:新增 RDS 角色。 #18206
- [特性] Azure 服务发现:新增对 Azure 工作负载身份验证方法的支持。 #17207
- [特性] 服务发现:引入
prometheus_sd_last_update_timestamp_seconds指标,用于跟踪最近一次向消费者发送服务发现更新的时间。 #18194 - [特性] Kubernetes 服务发现:新增对 Pod 角色的节点角色选择器支持。 #18006
- [特性] Kubernetes 服务发现:引入基于 Pod 的标签,用于部署、CronJob 和 Job 控制器名称,分别为
__meta_kubernetes_pod_deployment_name、__meta_kubernetes_pod_cronjob_name和__meta_kubernetes_pod_job_name。 #17774 - [特性] PromQL:新增
</和>/运算符,用于修剪原生直方图中的观测值。 #17904 - [特性] PromQL:新增实验性
histogram_quantiles可变参数函数,用于一次计算多个分位数。 #17285 - [特性] 时序数据库:新增
storage.tsdb.retention.percentage配置,用于设置可用于时序数据库存储的最大磁盘百分比。 #18080 - [特性] 时序数据库:新增实验性
st-storage功能标志。启用后,Prometheus 会将抓取或 OTLP 摄入的起始时间戳(ST,之前称为创建时间戳)存储在时序数据库和 Agent WAL 中,并通过 Remote Write 2 暴露它们。 #18062 - [特性] 时序数据库:新增实验性
xor2-encoding功能标志,用于针对抓取数据优化的新时序数据库块浮点采样块编码,并支持起始时间戳编码。 #18062 - [优化] HTTP 客户端:为 sigv4 新增 AWS
external_id支持。 #17916 - [优化] Kubernetes 服务发现:去重 Kubernetes API 的弃用警告日志以减少噪声。 #17829
- [优化] 时序数据库:在创建检查点时移除旧的临时检查点。 #17598
- [优化] 用户界面:新增对实验性 PromQL 函数
first_over_time和ts_of_first_over_time的自动补全支持。 #18318 - [优化] Vultr 服务发现:将 govultr 库从 v2 升级至 v3,以持续获得安全补丁和维护。 #18347
- [性能] PromQL:提升连接(VectorBinop)/And/Or/Unless 操作的性能并减少堆分配。 #17159
- [性能] PromQL:部分解决因使用
KahanAdd导致的原生直方图聚合性能回退。 #18252 - [性能] 远程写入:优化用于 RW 发送的 WAL 监视以重用内部缓冲区。 #18250
- [性能] 时序数据库:优化匹配器的 LabelValues 交集性能。 #18069
- [性能] 用户界面:在堆叠序列图中跳过悬停时的重新堆叠。 #18230
- [错误修复] AWS 服务发现:修复 EC2 服务发现忽略已配置
endpoint选项的问题,此为 AWS SDK v2 迁移引入的回退。 #18133 - [错误修复] AWS 服务发现:修复当 DescribeAvailabilityZones 返回空的 ZoneName 或 ZoneId 时 EC2 服务发生 panic 的问题。 #18133
- [错误修复] 代理:修复由重复 SeriesRefs 作为活动序列加载导致的内存泄漏。 #17538
- [错误修复] 告警:修复在配置文件中增加 FOR 告警持续时间后,告警状态错误重置为挂起的问题。 #18244
- [错误修复] Azure 服务发现:修复当
client_id为空时系统分配的托管身份无法工作的问题。 #18323 - [错误修复] Consul 服务发现:修复过滤器参数未应用于健康服务端点,导致节点和 Node.Meta 过滤器被忽略的问题。 #17349
- [错误修复] Kubernetes 服务发现:修复由
*DualStackEndpointSlice 策略生成的重复目标。 #18192 - [错误修复] OTLP:修复在 PRW v2 直方图写入路径中 ErrTooOldSample 作为 HTTP 500 而非 400 返回,防止客户端无限重试循环的问题。 #18084
- [错误修复] OTLP:修复示例混合在直方图不正确部分的问题。 #18056
- [错误修复] PromQL:在使用直方图修剪的查询中不再跳过直方图桶。 #18263
- [错误修复] 远程写入:修复
prometheus_remote_storage_sent_batch_duration_seconds在请求发送前开始测量的问题。 #18214 - [错误修复] 规则:修复当规则标签包含 Go 模板表达式时告警状态恢复的问题。 #18375
- [错误修复] 抓取:修复在仅花括号指标表示法中解析无等号的裸标签名时发生 panic 的问题。 #18229
- [错误修复] 时序数据库:在不支持的环境中设置
use-uncached-io功能标志时提前失败。 #18219 - [错误修复] 时序数据库:当配置文件中移除保留设置时,回退到 CLI 标志值。 #18200
- [错误修复] 时序数据库:通过在返回缓冲区到池之前清除引用字段,修复缓冲池中的内存泄漏。 #17895
- [错误修复] 时序数据库:修复 WAL 重放期间直方图块缺失 mmap 的问题。 #18306
- [错误修复] 时序数据库:修复文件中
storage.tsdb.retention.time单位不匹配,导致保留时间比配置长 1e6 倍的问题。 #18200 - [错误修复] 追踪:修复启用追踪时查询日志中缺少 traceID 的问题,之前仅发出 spanID。 #18189
- [错误修复] 用户界面:修复使用多个图表面板时提示框 Y 轴偏移漂移的问题。 #18228
- [错误修复] 用户界面:在配置重新加载时更新运行时信息中的保留显示。 #18200
更新内容 (原始)
- [CHANGE] Hetzner SD: The
__meta_hetzner_datacenterlabel is deprecated for the rolerobotbut kept for backward compatibility, use the__meta_hetzner_robot_datacenterlabel instead. For the rolehcloud, the label is deprecated and will stop working after the 1 July 2026. #17850 - [CHANGE] Hetzner SD: The
__meta_hetzner_hcloud_datacenter_locationand__meta_hetzner_hcloud_datacenter_location_network_zonelabels are deprecated, use the__meta_hetzner_hcloud_locationand__meta_hetzner_hcloud_location_network_zonelabels instead. #17850 - [CHANGE] Promtool: Redirect debug output to stderr to avoid interfering with stdout-based tool output. #18346
- [FEATURE] AWS SD: Add Elasticache Role. #18099
- [FEATURE] AWS SD: Add RDS Role. #18206
- [FEATURE] Azure SD: Add support for Azure Workload Identity authentication method. #17207
- [FEATURE] Discovery: Introduce
prometheus_sd_last_update_timestamp_secondsmetric to track the last time a service discovery update was sent to consumers. #18194 - [FEATURE] Kubernetes SD: Add support for node role selectors for pod roles. #18006
- [FEATURE] Kubernetes SD: Introduce pod-based labels for deployment, cronjob, and job controller names:
__meta_kubernetes_pod_deployment_name,__meta_kubernetes_pod_cronjob_nameand__meta_kubernetes_pod_job_name, respectively. #17774 - [FEATURE] PromQL: Add
</and>/operators for trimming observations from native histograms. #17904 - [FEATURE] PromQL: Add experimental
histogram_quantilesvariadic function for computing multiple quantiles at once. #17285 - [FEATURE] TSDB: Add
storage.tsdb.retention.percentageconfiguration to configure the maximum percent of disk usable for TSDB storage. #18080 - [FEATURE] TSDB: Add an experimental
st-storagefeature flag. When enabled, Prometheus stores ingested start timestamps (ST, previously called Created Timestamp) from scrape or OTLP in the TSDB and Agent WAL, and exposes them via Remote Write 2. #18062 - [FEATURE] TSDB: Add an experimental
xor2-encodingfeature flag for the new TSDB block float sample chunk encoding that is optimized for scraped data and allows encoding start timestamps. #18062 - [ENHANCEMENT] HTTP client: Add AWS
external_idsupport for sigv4. #17916 - [ENHANCEMENT] Kubernetes SD: Deduplicate deprecation warning logs from the Kubernetes API to reduce noise. #17829
- [ENHANCEMENT] TSDB: Remove old temporary checkpoints when creating a Checkpoint. #17598
- [ENHANCEMENT] UI: Add autocomplete support for experimental
first_over_timeandts_of_first_over_timePromQL functions. #18318 - [ENHANCEMENT] Vultr SD: Upgrade govultr library from v2 to v3 for continued security patches and maintenance. #18347
- [PERF] PromQL: Improve performance and reduce heap allocations in joins (VectorBinop)/And/Or/Unless. #17159
- [PERF] PromQL: Partially address performance regression in native histogram aggregations due to using
KahanAdd. #18252 - [PERF] Remote write: Optimize WAL watching used for RW sending to reuse internal buffers. #18250
- [PERF] TSDB: Optimize LabelValues intersection performance for matchers. #18069
- [PERF] UI: Skip restacking on hover in stacked series charts. #18230
- [BUGFIX] AWS SD: Fix EC2 SD ignoring the configured
endpointoption, a regression from the AWS SDK v2 migration. #18133 - [BUGFIX] AWS SD: Fix panic in EC2 SD when DescribeAvailabilityZones returns nil ZoneName or ZoneId. #18133
- [BUGFIX] Agent: Fix memory leak caused by duplicate SeriesRefs being loaded as active series. #17538
- [BUGFIX] Alerting: Fix alert state incorrectly resetting to pending when the FOR period is increased in the config file. #18244
- [BUGFIX] Azure SD: Fix system-assigned managed identity not working when
client_idis empty. #18323 - [BUGFIX] Consul SD: Fix filter parameter not being applied to health service endpoint, causing Node and Node.Meta filters to be ignored. #17349
- [BUGFIX] Kubernetes SD: Fix duplicate targets generated by
*DualStackEndpointSlices policies. #18192 - [BUGFIX] OTLP: Fix ErrTooOldSample being returned as HTTP 500 instead of 400 in PRW v2 histogram write paths, preventing infinite client retry loops. #18084
- [BUGFIX] OTLP: Fix exemplars getting mixed between incorrect parts of a histogram. #18056
- [BUGFIX] PromQL: Do not skip histogram buckets in queries where histogram trimming is used. #18263
- [BUGFIX] Remote write: Fix
prometheus_remote_storage_sent_batch_duration_secondsmeasuring before the request was sent. #18214 - [BUGFIX] Rules: Fix alert state restoration when rule labels contain Go template expressions. #18375
- [BUGFIX] Scrape: Fix panic when parsing bare label names without an equal sign in brace-only metric notation. #18229
- [BUGFIX] TSDB: Fail early when
use-uncached-iofeature flag is set on unsupported environments. #18219 - [BUGFIX] TSDB: Fall back to CLI flag values when retention is removed from config file. #18200
- [BUGFIX] TSDB: Fix memory leaks in buffer pools by clearing reference fields before returning buffers to pools. #17895
- [BUGFIX] TSDB: Fix missing mmap of histogram chunks during WAL replay. #18306
- [BUGFIX] TSDB: Fix storage.tsdb.retention.time unit mismatch in file causing retention to be 1e6 times longer than configured. #18200
- [BUGFIX] Tracing: Fix missing traceID in query log when tracing is enabled, previously only spanID was emitted. #18189
- [BUGFIX] UI: Fix tooltip Y-offset drift when using multiple graph panels. #18228
- [BUGFIX] UI: Update retention display in runtime info when config is reloaded. #18200
下载链接
- prometheus-3.11.0.darwin-amd64.tar.gz
- prometheus-3.11.0.darwin-arm64.tar.gz
- prometheus-3.11.0.dragonfly-amd64.tar.gz
- prometheus-3.11.0.freebsd-386.tar.gz
- prometheus-3.11.0.freebsd-amd64.tar.gz
- prometheus-3.11.0.freebsd-arm64.tar.gz
- prometheus-3.11.0.freebsd-armv6.tar.gz
- prometheus-3.11.0.freebsd-armv7.tar.gz
- prometheus-3.11.0.illumos-amd64.tar.gz
- prometheus-3.11.0.linux-386.tar.gz
- prometheus-3.11.0.linux-amd64.tar.gz
- prometheus-3.11.0.linux-arm64.tar.gz
- prometheus-3.11.0.linux-armv5.tar.gz
- prometheus-3.11.0.linux-armv6.tar.gz
- prometheus-3.11.0.linux-armv7.tar.gz
- prometheus-3.11.0.linux-mips.tar.gz
- prometheus-3.11.0.linux-mips64.tar.gz
- prometheus-3.11.0.linux-mips64le.tar.gz
- prometheus-3.11.0.linux-mipsle.tar.gz
- prometheus-3.11.0.linux-ppc64.tar.gz
- prometheus-3.11.0.linux-ppc64le.tar.gz
- prometheus-3.11.0.linux-riscv64.tar.gz
- prometheus-3.11.0.linux-s390x.tar.gz
- prometheus-3.11.0.netbsd-386.tar.gz
- prometheus-3.11.0.netbsd-amd64.tar.gz
- prometheus-3.11.0.netbsd-arm64.tar.gz
- prometheus-3.11.0.netbsd-armv6.tar.gz
- prometheus-3.11.0.netbsd-armv7.tar.gz
- prometheus-3.11.0.windows-386.tar.gz
- prometheus-3.11.0.windows-386.zip
- prometheus-3.11.0.windows-amd64.tar.gz
- prometheus-3.11.0.windows-amd64.zip
- prometheus-3.11.0.windows-arm64.tar.gz
- prometheus-3.11.0.windows-arm64.zip
- prometheus-web-ui-3.11.0.tar.gz
- sha256sums.txt