发布日期: 2024-09-23
版本号: v2.55.0-rc.0

Prometheus团队在准备发布2.55版本,该版本包含多项新功能、性能优化和错误修复。新功能需通过特性标志启用,包括支持标签名使用UTF-8字符(utf8-names)、自动重载配置(auto-reload-config)、在配置中设置自定义HTTP请求头、PromQL延迟移除__name__标签(promql-delayed-name-removal)等。性能方面优化了无序数据与有序数据混合查询的效率,并支持远程读取流模式。错误修复涉及服务发现模块的目标管理、远程写入的元数据发送问题、重复标签导致的错误码修正,以及原生直方图相关的多项问题。此外,OTLP接收器支持将资源属性提升为指标标签,Promtool工具新增添加标签和生成JUnit测试结果的功能,并改进了查询精度与错误日志的清晰度。

更新内容 (中文)

  • [功能] 支持标签名称中的 UTF-8 字符 - 特性标志 utf8-names。#14482 #14880 #14736 #14727
  • [功能] 支持自动重载配置 - 特性标志 auto-reload-config。#14769
  • [功能] 抓取: 支持在配置中设置自定义 http_headers。#14817
  • [功能] 抓取: OpenMetrics 中支持特性标志 created-timestamp-zero-ingestion。#14356 #14815
  • [功能] 抓取: scrape_failure_log_file 选项可将抓取失败记录至文件。#14734
  • [功能] PromQL: 延迟移除 __name__ 标签 - 特性标志 promql-delayed-name-removal。#14477
  • [功能] OTLP 接收器: 可选将资源属性提升为时序标签。#14200
  • [功能] API: 支持多个 --web.listen-address。#14665
  • [功能] 远程写入: 支持 Google Cloud Monitoring 授权。#14346
  • [功能] Promtool: tsdb create-blocks 新增添加标签的选项。#14403
  • [功能] Promtool: promtool test 新增 --junit 格式化结果参数。#14506
  • [优化] OTLP 接收器: 对计数为零但总和非零的指数直方图发出警告。#14706
  • [优化] OTLP 接收器: 上下文取消/超时时中断转换。#14612
  • [优化] PromQL: 增强分布式追踪的细节信息。#14816
  • [优化] PromQL: 实验性函数 sort_by_labelsort_by_label_desc 在标签值相等时按所有标签排序。#14655
  • [优化] PromQL: 优化查询评估时 Go 运行时 panic 的错误日志信息。#14621
  • [优化] PromQL: 使用 Kahan 求和算法提升 avgavg_over_time 的精度。#14413
  • [优化] TSDB: 兼容即将发布的索引格式 v3。#14934
  • [性能] 远程读取: 支持流式传输模式。#11379
  • [性能] TSDB: 同时查询有序和无序时序数据。#14354 #14693 #14714 #14831 #14874 #14948
  • [性能] TSDB: 优化重叠无序 head chunks 的读取流程。#14729
  • [修复] 服务发现: 修复目标丢失问题 (需启用特性标志 new-service-discovery-manager)。#13147 #13622
  • [修复] 修复(utf8): 将 validationScheme 配置传递至抓取选项。#14880
  • [修复] PromQL: 实验性原生直方图: 禁止在直方图间复用 spans。#14771
  • [修复] 抓取: 修复 protobuf 抓取可能丢弃样本的问题。#14810
  • [修复] 远程写入: 修复实验性远程写入 V2 的元数据发送。#14766
  • [修复] 远程写入: 当时间序列存在重复标签时返回 4xx 而非 5xx 错误。#14716
  • [修复] 实验性原生直方图: 修复多项结果错误、panic 和告警问题。#14598 #14611 #14609 #14575 #14513 #14821
  • [修复] TSDB: 仅在 record_decode_failures_total 指标中统计未知记录类型。#14042
  • [优化] 远程写入: 若上次更新后未成功发送样本,则跳过 reshard 操作。#14450

更新内容 (原始)

While all the excitement is focused on Prometheus 3.0, we are preparing release 2.55.

This release has quite a few new features, some of which require a feature-flag to enable, a major optimisation of queries when out-of-order data is present, and a number of bug-fixes.

  • [FEATURE] Support UTF-8 characters in label names - feature flag utf8-names. #14482, #14880, #14736, #14727
  • [FEATURE] Support config reload automatically - feature flag auto-reload-config. #14769
  • [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] PromQL: Delay removal of __name__ label - feature flag promql-delayed-name-removal. #14477
  • [FEATURE] OTLP receiver: Optional promotion of resource attributes to series labels. #14200
  • [FEATURE] API: Support multiple --web.listen-address. #14665
  • [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
  • [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] PromQL: Improve detail in distributed tracing. #14816
  • [ENHANCEMENT] PromQL: Experimental sort_by_label and sort_by_label_desc sort by all labels when label is equal. #14655
  • [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 and avg_over_time. #14413
  • [ENHANCEMENT] TSDB: Backward compatibility with upcoming index v3. #14934
  • [PERF] Remote-Read: Support streaming mode. #11379
  • [PERF] TSDB: Query in-order and out-of-order series together. #14354, #14693, #14714, #14831, #14874, #14948
  • [PERF] TSDB: Streamline reading of overlapping out-of-order head chunks. #14729
  • [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] fix(utf8): propagate validationScheme config to scraping options. #14880
  • [BUGFIX] PromQL: Experimental Native Histograms: Do not re-use spans between histograms. #14771
  • [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. #14598, #14611, #14609, #14575, #14513, #14821
  • [BUGFIX] TSDB: Only count unknown record types in record_decode_failures_total metric. #14042
  • [ENHANCEMENT] Remote-Write: Don’t reshard if we haven’t successfully sent a sample since last update. #14450

下载链接