prometheus v3.10.0-rc.1 版本更新介绍
发布日期: 2026-02-20
版本号: v3.10.0-rc.1
Prometheus 现在提供了名为
distroless的 Docker 镜像变体,与默认的busybox镜像并存。distroless版本基于最小化基础镜像,增强了安全性,使用 UID/GID 65532(非 root 用户)替代 nobody 用户,并移除了 VOLUME 声明。两个变体通过-busybox和-distroless标签后缀区分(例如prom/prometheus:latest-busybox和prom/prometheus:latest-distroless)。busybox镜像仍是默认版本(无后缀,如prom/prometheus:latest)。
对于从 busybox 镜像迁移到 distroless 版本并使用命名卷的用户,可运行以下命令调整所有权:
docker run --rm -v prometheus-data:/prometheus alpine chown -R 65532:65532 /prometheus
然后使用旧卷启动新容器:
docker run -v prometheus-data:/prometheus prom/prometheus:latest-distroless
使用绑定挂载的用户可能需要根据自身配置调整权限。
其他更新包括:在告警相关指标中增加 alertmanager 维度;UI 中默认隐藏告警注释;AWS 服务发现新增 MSK 角色;PromQL 新增 fill()/fill_left()/fill_right() 修饰符用于指定缺失序列的默认值;Web API 添加 OpenAPI 3.2 规范;新增基于按需采样的性能剖析功能;改进了 PromQL 直方图分位数单调性注释、告警发送循环、实验性过期序列压缩、服务发现可裁剪构建、Promtool 语法支持;优化了 PromQL 标签提取、正则匹配、OTLP 转换缓存、目标重标记步骤计算和标签值交集性能;修复了多项 PromQL、Web 界面、TSDB 和 OTLP 相关的缺陷,包括查询崩溃、头部缺失、函数返回空值、示例丢弃、图表显示异常、内存泄漏、零除错误、数据丢失以及直方图处理等问题。
更新内容 (中文)
Prometheus 现在除默认的 busybox 镜像外,还提供 distroless 变体 Docker 镜像。distroless 变体采用最小化基础镜像以增强安全性,使用 UID/GID 65532(非 root 用户)替代 nobody,并移除了 VOLUME 声明。两种变体通过 -busybox 和 -distroless 标签后缀区分(例如 prom/prometheus:latest-busybox、prom/prometheus:latest-distroless)。busybox 镜像仍为默认版本,不使用后缀以保证向后兼容(例如 prom/prometheus:latest 指向 busybox 变体)。
用户从 busybox 镜像迁移现有命名卷至 distroless 变体时,可通过以下命令调整所有权:
docker run --rm -v prometheus-data:/prometheus alpine chown -R 65532:65532 /prometheus
然后可使用旧卷启动容器:
docker run -v prometheus-data:/prometheus prom/prometheus:latest-distroless
从绑定挂载迁移的用户可能需要根据自身配置调整权限。
- [变更] 告警:为以下指标添加
alertmanager维度:prometheus_notifications_dropped_total、prometheus_notifications_queue_capacity、prometheus_notifications_queue_length。#16355 - [变更] UI:默认隐藏已展开的告警注释,以提高
/alerts页面的信息密度。#17611 - [功能] AWS SD:添加 MSK 角色。#17600
- [功能] PromQL:添加
fill()/fill_left()/fill_right()二元操作符修饰符,用于为缺失序列指定默认值。#17644 - [功能] Web:为 HTTP API 添加 OpenAPI 3.2 规范,路径为
/api/v1/openapi.yaml。#17825 - [功能] Dockerfile:添加使用 UID/GID 65532 且无 VOLUME 声明的 distroless 镜像变体。busybox 镜像仍为默认。#17876
- [功能] Web:在
<URL>/debug/pprof/fgprof下添加按需运行时分析功能。#18027 - [优化] PromQL:为直方图分位数单调性信息注释添加更多细节。#15578
- [优化] 告警:实现独立的告警管理器发送循环。#16355
- [优化] TSDB:实验性支持通过配置文件中的可配置阈值
stale_series_compaction_threshold在内存中提前压缩过期序列。#16929 - [优化] 服务发现:现在可通过 Go 构建标签
remove_all_sd从 Prometheus 二进制文件中移除服务发现,单个服务发现可通过构建标签enable_<sd name>_sd重新添加。用户可构建仅包含必要 SD 的自定义 Prometheus 以减小二进制文件大小。#17736 - [优化] Promtool:支持 PromQL 语法特性
promql-duration-expr和promql-extended-range-selectors。#17926 - [性能] PromQL:避免 PromQL 函数中的不必要标签提取。#17676
- [性能] PromQL:改进正则表达式匹配器(如
.*-.*-.*)的性能。#17707 - [性能] OTLP:为 OTLP 到 Prometheus 的转换添加标签缓存,以减少分配并提高延迟。#17860
- [性能] API:通过单次遍历计算
/api/v1/targets/relabel_steps,而非为每个前缀重新运行重标签。#17969 - [性能] TSDB:优化匹配器的 LabelValues 交集性能。#18069
- [修复] PromQL:防止仅包含 UTF-8 连续字节的查询字符串导致 Prometheus 崩溃。#17735
- [修复] Web:修复在
NotReady状态下/-/ready端点缺少X-Prometheus-Stopping头的问题。#17795 - [修复] PromQL:修复 PromQL
info()函数在通过输入指标和target_info上都存在的标签进行过滤时返回空结果的问题。#17817 - [修复] TSDB:修复示例缓冲区扩容/缩容期间可能导致示例被错误丢弃的错误。#17863
- [修复] UI:修复页面重新加载后图形显示损坏的问题,原因是 Y 轴最小值的编码/解码错误。#17869
- [修复] TSDB:通过在缓冲区返回池前清除引用字段(标签、直方图指针、元数据字符串)来修复缓冲池中的内存泄漏。#17879
- [修复] PromQL:info 函数:修复没有标识标签的序列无法返回的问题。#17898
- [修复] OTLP:过滤 OTLP 属性中的
__name__以防止重复标签。#17917 - [修复] TSDB:修复在空头部计算过期序列比例时出现的除零错误。#17952
- [修复] OTLP:修复 sum 指标可能出现的静默数据丢失问题。#17954
- [修复] PromQL:修复跨计数器重置的平滑插值问题。#17988
- [修复] PromQL:修复在空范围上使用
@修饰符时的 panic 问题。#18020 - [修复] PromQL:修复单个原生直方图的
avg_over_time问题。#18058
更新内容 (原始)
Prometheus now offers a distroless Docker image variant alongside the default
busybox image. The distroless variant provides enhanced security with a minimal
base image, uses UID/GID 65532 (nonroot) instead of nobody, and removes the
VOLUME declaration. Both variants are available with -busybox and -distroless
tag suffixes (e.g., prom/prometheus:latest-busybox, prom/prometheus:latest-distroless).
The busybox image remains the default with no suffix for backwards compatibility
(e.g., prom/prometheus:latest points to the busybox variant).
For users migrating existing named volumes from the busybox image to the distroless variant, the ownership can be adjusted with:
docker run --rm -v prometheus-data:/prometheus alpine chown -R 65532:65532 /prometheus
Then, the container can be started with the old volume with:
docker run -v prometheus-data:/prometheus prom/prometheus:latest-distroless
User migrating from bind mounts might need to ajust permissions too, depending on their setup.
- [CHANGE] Alerting: Add
alertmanagerdimension to following metrics:prometheus_notifications_dropped_total,prometheus_notifications_queue_capacity,prometheus_notifications_queue_length. #16355 - [CHANGE] UI: Hide expanded alert annotations by default, enabling more information density on the
/alertspage. #17611 - [FEATURE] AWS SD: Add MSK Role. #17600
- [FEATURE] PromQL: Add
fill()/fill_left()/fill_right()binop modifiers for specifying default values for missing series. #17644 - [FEATURE] Web: Add OpenAPI 3.2 specification for the HTTP API at
/api/v1/openapi.yaml. #17825 - [FEATURE] Dockerfile: Add distroless image variant using UID/GID 65532 and no VOLUME declaration. Busybox image remains default. #17876
- [FEATURE] Web: Add on-demand wall time profiling under
<URL>/debug/pprof/fgprof. #18027 - [ENHANCEMENT] PromQL: Add more detail to histogram quantile monotonicity info annotations. #15578
- [ENHANCEMENT] Alerting: Independent alertmanager sendloops. #16355
- [ENHANCEMENT] TSDB: Experimental support for early compaction of stale series in the memory with configurable threshold
stale_series_compaction_thresholdin the config file. #16929 - [ENHANCEMENT] Service Discovery: Service discoveries are now removable from the Prometheus binary through the Go build tag
remove_all_sdand individual service discoveries can be re-added with the build tagsenable_<sd name>_sd. Users can build a custom Prometheus with only the necessary SDs for a smaller binary size. #17736 - [ENHANCEMENT] Promtool: Support promql syntax features
promql-duration-exprandpromql-extended-range-selectors. #17926 - [PERF] PromQL: Avoid unnecessary label extraction in PromQL functions. #17676
- [PERF] PromQL: Improve performance of regex matchers like
.*-.*-.*. #17707 - [PERF] OTLP: Add label caching for OTLP-to-Prometheus conversion to reduce allocations and improve latency. #17860
- [PERF] API: Compute
/api/v1/targets/relabel_stepsin a single pass instead of re-running relabeling for each prefix. #17969 - [PERF] tsdb: Optimize LabelValues intersection performance for matchers. #18069
- [BUGFIX] PromQL: Prevent query strings containing only UTF-8 continuation bytes from crashing Prometheus. #17735
- [BUGFIX] Web: Fix missing
X-Prometheus-Stoppingheader for/-/readyendpoint inNotReadystate. #17795 - [BUGFIX] PromQL: Fix PromQL
info()function returning empty results when filtering by a label that exists on both the input metric andtarget_info. #17817 - [BUGFIX] TSDB: Fix a bug during exemplar buffer grow/shrink that could cause exemplars to be incorrectly discarded. #17863
- [BUGFIX] UI: Fix broken graph display after page reload, due to broken Y axis min encoding/decoding. #17869
- [BUGFIX] TSDB: Fix memory leaks in buffer pools by clearing reference fields (Labels, Histogram pointers, metadata strings) before returning buffers to pools. #17879
- [BUGFIX] PromQL: info function: fix series without identifying labels not being returned. #17898
- [BUGFIX] OTLP: Filter
__name__from OTLP attributes to prevent duplicate labels. #17917 - [BUGFIX] TSDB: Fix division by zero when computing stale series ratio with empty head. #17952
- [BUGFIX] OTLP: Fix potential silent data loss for sum metrics. #17954
- [BUGFIX] PromQL: Fix smoothed interpolation across counter resets. #17988
- [BUGFIX] PromQL: Fix panic with
@modifier on empty ranges. #18020 - [BUGFIX] PromQL: Fix
avg_over_timefor a single native histogram. #18058
下载链接
- prometheus-3.10.0-rc.1.darwin-amd64.tar.gz
- prometheus-3.10.0-rc.1.darwin-arm64.tar.gz
- prometheus-3.10.0-rc.1.dragonfly-amd64.tar.gz
- prometheus-3.10.0-rc.1.freebsd-386.tar.gz
- prometheus-3.10.0-rc.1.freebsd-amd64.tar.gz
- prometheus-3.10.0-rc.1.freebsd-arm64.tar.gz
- prometheus-3.10.0-rc.1.freebsd-armv6.tar.gz
- prometheus-3.10.0-rc.1.freebsd-armv7.tar.gz
- prometheus-3.10.0-rc.1.illumos-amd64.tar.gz
- prometheus-3.10.0-rc.1.linux-386.tar.gz
- prometheus-3.10.0-rc.1.linux-amd64.tar.gz
- prometheus-3.10.0-rc.1.linux-arm64.tar.gz
- prometheus-3.10.0-rc.1.linux-armv5.tar.gz
- prometheus-3.10.0-rc.1.linux-armv6.tar.gz
- prometheus-3.10.0-rc.1.linux-armv7.tar.gz
- prometheus-3.10.0-rc.1.linux-mips.tar.gz
- prometheus-3.10.0-rc.1.linux-mips64.tar.gz
- prometheus-3.10.0-rc.1.linux-mips64le.tar.gz
- prometheus-3.10.0-rc.1.linux-mipsle.tar.gz
- prometheus-3.10.0-rc.1.linux-ppc64.tar.gz
- prometheus-3.10.0-rc.1.linux-ppc64le.tar.gz
- prometheus-3.10.0-rc.1.linux-riscv64.tar.gz
- prometheus-3.10.0-rc.1.linux-s390x.tar.gz
- prometheus-3.10.0-rc.1.netbsd-386.tar.gz
- prometheus-3.10.0-rc.1.netbsd-amd64.tar.gz
- prometheus-3.10.0-rc.1.netbsd-arm64.tar.gz
- prometheus-3.10.0-rc.1.netbsd-armv6.tar.gz
- prometheus-3.10.0-rc.1.netbsd-armv7.tar.gz
- prometheus-3.10.0-rc.1.windows-386.tar.gz
- prometheus-3.10.0-rc.1.windows-386.zip
- prometheus-3.10.0-rc.1.windows-amd64.tar.gz
- prometheus-3.10.0-rc.1.windows-amd64.zip
- prometheus-3.10.0-rc.1.windows-arm64.tar.gz
- prometheus-3.10.0-rc.1.windows-arm64.zip
- prometheus-web-ui-3.10.0-rc.1.tar.gz
- sha256sums.txt