@Greptime: Greptime 月度更新第87期:Prometheus原生直方图现已在GreptimeDB中实现端到端支持:可通过远程写入v…

X AI KOLs Timeline 工具

摘要

GreptimeDB 2026年8月月度更新引入了对Prometheus原生直方图的端到端支持、基于OTLP追踪的服务依赖图(实验性),以及v1.2.0-beta.2版本中的破坏性变更。

Greptime 月度更新第87期 Prometheus原生直方图现已在GreptimeDB中实现端到端支持:可通过远程写入v2或OTLP写入,使用PromQL聚合,并通过Prometheus HTTP API(包括/metadata)进行读取。 迁移相关要点:histogram_quantile和histogram_fraction可在单次扫描中同时处理经典le桶、原生直方图以及包含两者的表。无需预先转换所有内容。 8月报告还包含:基于OTLP追踪的实时服务依赖图(实验性功能)、需要通过启用标志开启的累积OTLP指数直方图,以及v1.2.0-beta.2版本中值得升级前了解的两项破坏性变更。
查看原文
查看缓存全文

缓存时间: 2026/09/01 17:49

Greptime月度报告第87期:GreptimeDB现已全面支持Prometheus原生直方图——可通过remote write v2或OTLP写入,使用PromQL聚合查询,并通过Prometheus HTTP API(含/metadata端点)读取。对于迁移至关重要的部分是:histogram_quantilehistogram_fraction函数能在单次扫描中同时处理传统le桶、原生直方图及混合存储的表。您无需预先转换所有数据。本期八月报告还包括:基于OTLP链路数据在读取时生成服务依赖关系图(实验性功能)、需通过opt-in标志启用的累计型OTLP指数直方图,以及v1.2.0-beta.2版本中两个在升级前值得检查的破坏性变更。—

原生直方图查询与实验性服务依赖关系图 | Greptime月度报告 - 第87期

来源:https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report

摘要

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#summary) 2026年8月 · 2026-08-01 – 2026-08-31

本月主要更新:

  • Prometheus原生直方图现已实现端到端可查询,从PromQL聚合到Prometheus HTTP响应。
  • OTLP链路数据现已可生成可通过SQL查询的服务依赖关系图,该图在读取时派生,仍处于实验阶段。
  • 通过opt-in选项可摄取累计型OTLP指数直方图。

GreptimeDB于8月21日发布了v1.2.0-beta.2版本 (https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.2.0-beta.2),这是v1.2系列的第二个beta版:包含随ALTER TABLE生效的单向skip_wal变更、JSON2扩展与布局准备、过程与管理事件可观测性,以及Flow运行时可观测性。升级前请务必注意两个破坏性变更:

软删除与表恢复功能再次变为企业版专属功能 (db#8747 (https://github.com/GreptimeTeam/greptimedb/pull/8747)) —— beta1版本由于缺少企业功能门控而在OSS版本中意外暴露。OSS beta2的metasrv在启动时会拒绝gc.experimental_soft_drop.enable = true配置,并且无法恢复或清除beta1中软删除的表,请先恢复您需要的表。

持久化的原生直方图字段也变更了符号属性 (db#8824 (https://github.com/GreptimeTeam/greptimedb/pull/8824)),目前没有提供迁移、降级或混合版本路径。

贡献者

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#contributors) 过去一个月,共有20位贡献者合并了166个PR。其中8位社区贡献者贡献了10个PR。欢迎我们的新贡献者:@xhwhis (https://github.com/xhwhis)@tian1220A (https://github.com/tian1220A)@dhruvxvaishnav (https://github.com/dhruvxvaishnav)@wy471x (https://github.com/wy471x)@fzlzjerry (https://github.com/fzlzjerry)@grezzko (https://github.com/grezzko)

感谢本月提交贡献的社区成员:

  • @xhwhis (https://github.com/xhwhis) db#8722 (https://github.com/GreptimeTeam/greptimedb/pull/8722) db#8721 (https://github.com/GreptimeTeam/greptimedb/pull/8721)
  • @lyang24 (https://github.com/lyang24) db#8767 (https://github.com/GreptimeTeam/greptimedb/pull/8767) db#8733 (https://github.com/GreptimeTeam/greptimedb/pull/8733)
  • @onepizzateam (https://github.com/onepizzateam) db#8392 (https://github.com/GreptimeTeam/greptimedb/pull/8392)
  • @dhruvxvaishnav (https://github.com/dhruvxvaishnav) db#8935 (https://github.com/GreptimeTeam/greptimedb/pull/8935)
  • @tian1220A (https://github.com/tian1220A) db#8960 (https://github.com/GreptimeTeam/greptimedb/pull/8960)
  • @grezzko (https://github.com/grezzko) db#8659 (https://github.com/GreptimeTeam/greptimedb/pull/8659)
  • @fzlzjerry (https://github.com/fzlzjerry) db#8859 (https://github.com/GreptimeTeam/greptimedb/pull/8859)
  • @wy471x (https://github.com/wy471x) db#8923 (https://github.com/GreptimeTeam/greptimedb/pull/8923)

亮点

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#highlights)

db#8850 (https://github.com/GreptimeTeam/greptimedb/pull/8850) feat(servers): 通过Prometheus HTTP暴露原生直方图

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#db-8850-feat-servers-expose-native-histograms-over-prometheus-http)

Prometheus原生直方图现已可端到端使用:通过remote write v2或OTLP写入,使用PromQL聚合,并通过Prometheus HTTP API(包括/metadata、标签发现和查询注释)读取。与传统le桶相比,您无需为每个桶创建一个指标序列即可获得高分辨率延迟分布,且切换过程可以渐进式进行:db#8874 (https://github.com/GreptimeTeam/greptimedb/pull/8874) 能在单次扫描中对传统、原生及混合输入数据评估histogram_quantilehistogram_fraction函数。

这标志着七月份报告中提到的六个进行中的PR系列工作已完成:采样类型语义 (db#8758 (https://github.com/GreptimeTeam/greptimedb/pull/8758))、摄取验证 (db#8775 (https://github.com/GreptimeTeam/greptimedb/pull/8775))、混合浮点与直方图采样的范围处理 (db#8784 (https://github.com/GreptimeTeam/greptimedb/pull/8784))、向量运算符 (db#8798 (https://github.com/GreptimeTeam/greptimedb/pull/8798)),以及直方图感知的sumavgcountgroupcount_values聚合 (db#8848 (https://github.com/GreptimeTeam/greptimedb/pull/8848))。

如果您已存储原生直方图,有两点变更需注意:持久化字段的符号属性变更 (db#8824 (https://github.com/GreptimeTeam/greptimedb/pull/8824)),以及配置位置现已移至prom_store下 (db#8744 (https://github.com/GreptimeTeam/greptimedb/pull/8744))。

db#8614 (https://github.com/GreptimeTeam/greptimedb/pull/8614) feat: 基于遥测数据的读取时实体关系图

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#db-8614-feat-read-time-entity-relationships-graph-over-telemetry)

一旦OTLP链路数据存入GreptimeDB,就无需单独构建服务依赖关系图。使用SQL查询greptime_private.semantic_entitiesgreptime_private.semantic_relationships表,即可查看哪个服务调用了哪个服务,并在每条边上展示RED指标。派生过程在读取时进行,且作为调用方:每个源表单独授权,取消操作和截止时间由调用方控制,时间窗口来自查询中的observed_at过滤条件,默认为过去一小时 (db#8794 (https://github.com/GreptimeTeam/greptimedb/pull/8794))。

遥测数据无法展示的依赖关系,可手动插入greptime_private.semantic_relationships_declared表。

此功能仍处于实验阶段:相关表位于greptime_private架构中,尚无正式文档,输出模式可能变更。

仅发出指标的服务需要开启otlp.experimental_enable_resource_info(默认关闭)。

本月后续工作扩展了图能识别的依赖类型:更多的派生边类型以及针对Prometheus、Kubernetes和gen_ai属性的内置命名约定 (db#8836 (https://github.com/GreptimeTeam/greptimedb/pull/8836)、db#8854 (https://github.com/GreptimeTeam/greptimedb/pull/8854)、db#8880 (https://github.com/GreptimeTeam/greptimedb/pull/8880)、db#8797 (https://github.com/GreptimeTeam/greptimedb/pull/8797)、db#8904 (https://github.com/GreptimeTeam/greptimedb/pull/8904)、db#8936 (https://github.com/GreptimeTeam/greptimedb/pull/8936))。

db#8900 (https://github.com/GreptimeTeam/greptimedb/pull/8900) feat(otlp): 支持累计型指数直方图

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#db-8900-feat-otlp-support-cumulative-exponential-histograms)

如果您的OTel流水线发出指数直方图,现在无需在写入前将其转换为固定桶。启用otlp.experimental_enable_exponential_histogram(默认关闭),累计型ExponentialHistogram指标将作为普通原生直方图存储:采用相同的存储格式,无需特定于协议的查询路径。

目前仅支持累计型时间性。缩放比例-4..8可直接映射,更精细的分辨率会降采样至8;尚未支持delta时间性、min/max、示例数据和OTel Arrow。

无法摄取的数据点现在会被报告而非静默接受,混合了有效和无效数据点的请求会返回部分成功结果。

db#8768 (https://github.com/GreptimeTeam/greptimedb/pull/8768) feat: 添加丢弃未刷新数据的管理功能

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#db-8768-feat-add-admin-function-to-discard-unflushed-data)

作为最后的恢复手段,现在可以丢弃某个region的未刷入磁盘的内存数据,而不会丢失已持久化的数据。ADMIN discard_unflushed_data(...) 接受一个region ID或表名(用于覆盖该表的所有region),并保留所有已持久化的SST文件。

在引擎层面 (db#8600 (https://github.com/GreptimeTeam/greptimedb/pull/8600)),WAL重放边界会在memtable交换前被提前并持久化,因此重复调用是安全的,陈旧的进行中刷新操作也不会重新发布已丢弃的行。

db#8734 (https://github.com/GreptimeTeam/greptimedb/pull/8734) feat(event): 为procedure事件添加事件上下文

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#db-8734-feat-event-add-event-context-to-procedure-events)

greptime_private.events表现在记录了DDL操作的来源。每个提交的procedure事件都携带一个结构化的EventContext(JSONB格式),可区分SQL、gRPC、Prometheus和OTLP来源,以及自动模式演进路径(auto_createauto_alter)。

现在可以通过SQL查询判断一个表是被人修改还是被摄取过程修改。

随着每个事件背后的执行者以及管理功能执行情况也被记录 (db#8849 (https://github.com/GreptimeTeam/greptimedb/pull/8849)、db#8835 (https://github.com/GreptimeTeam/greptimedb/pull/8835)、db#8856 (https://github.com/GreptimeTeam/greptimedb/pull/8856)、db#8834 (https://github.com/GreptimeTeam/greptimedb/pull/8834)),events表可作为审计跟踪使用。

本月其他更新

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#also-this-month)

  • Authorization: Bearer头现在可在/v1/系列HTTP接口上使用。服务器将令牌视为不透明字符串,将验证工作留给UserProvider,因此JWT和OIDC策略仍然保持在数据库外部 (db#8719 (https://github.com/GreptimeTeam/greptimedb/pull/8719))。
  • information_schema.flow_statisticsSHOW FLOW STATUS可显示Flow的实际运行情况;在分布式Flow中,start_timeuptime_seconds仍为NULL (db#8392 (https://github.com/GreptimeTeam/greptimedb/pull/8392))。
  • 较小的功能添加:uddsketch_rank (db#8929 (https://github.com/GreptimeTeam/greptimedb/pull/8929)) 和可合并的stddev_pop状态函数 (db#8972 (https://github.com/GreptimeTeam/greptimedb/pull/8972))、Unix系统下的greptime standalone start --daemon命令 (db#8960 (https://github.com/GreptimeTeam/greptimedb/pull/8960)),以及riscv64交叉编译发布产物 (db#8820 (https://github.com/GreptimeTeam/greptimedb/pull/8820))。
  • 引擎层面的工作继续进行:针对符合条件的稀疏指标region,两阶段指标系列扫描现在默认开启,其他情况回退到旧扫描方式,可通过experimental_series_scan_v2关闭 (db#8826 (https://github.com/GreptimeTeam/greptimedb/pull/8826)、db#8703 (https://github.com/GreptimeTeam/greptimedb/pull/8703)、db#8788 (https://github.com/GreptimeTeam/greptimedb/pull/8788)、db#8926 (https://github.com/GreptimeTeam/greptimedb/pull/8926));
  • JSON2扩展获得了按列DDL设置、v2布局原语和v2查询支持,尽管v2布局仍未设为默认 (db#8745 (https://github.com/GreptimeTeam/greptimedb/pull/8745)、db#8833 (https://github.com/GreptimeTeam/greptimedb/pull/8833)、db#8895 (https://github.com/GreptimeTeam/greptimedb/pull/8895)、db#8901 (https://github.com/GreptimeTeam/greptimedb/pull/8901)、db#8940 (https://github.com/GreptimeTeam/greptimedb/pull/8940)、db#8964 (https://github.com/GreptimeTeam/greptimedb/pull/8964))。

生态系统更新

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#ecosystem-updates)

Grafana插件

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#grafana-plugin) 本月发布两个版本 (v3.0.1 (https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/tag/v3.0.1)、v3.0.3 (https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/tag/v3.0.3))。

  • 查询通过Go后端执行,使用/v1/sql接口,因此面板SQL(包括时间宏)可直接在Grafana告警规则中使用。
  • 新增Use OTel开关,可自动填充GreptimeDB风格的日志和链路数据列。
  • v3.0.3修复了认证问题。现有的SQL面板、查询构建器配置和仪表板将继续正常工作。完整变更详见发布公告 (https://greptime.com/blogs/2026-08-20-greptimedb-grafana-plugin-backend-upgrade)。

Dashboard

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#dashboard) 本月发布四个版本 (v0.13.14 (https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.14)、v0.13.13 (https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.13)、v0.13.12 (https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.12)、v0.13.11 (https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.11))。

  • 仪表板可以完整快照形式导出。
  • 命令面板使导航和操作支持键盘驱动。
  • 虚拟列表表格支持列宽调整,紧凑视图使用每列自然宽度,并提供新的宽度选项。
  • 查询结果可全屏显示。
  • Perses更新至0.54版本,并移除了引导教程。
  • 更改主机后连接不再中断。

Kubernetes Operator

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#kubernetes-operator) 本月发布一个版本 (v0.6.1 (https://github.com/GreptimeTeam/greptimedb-operator/releases/tag/v0.6.1))。

  • 审计日志可通过CRD进行配置,包括前端组。
  • 服务端口可自定义。
  • 移除了ingress CRD字段,这是一个破坏性变更。

MCP Server

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#mcp-server) 本月发布一个版本 (v0.5.2 (https://github.com/GreptimeTeam/greptimedb-mcp-server/releases/tag/v0.5.2))。

  • mcp依赖固定为>=1.8.0,<2,以防止全新安装时出现ModuleNotFoundError

良好的首次贡献机会

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#good-first-issues) 以下两个问题规模适中,适合首次为GreptimeDB贡献。请在问题下评论以认领。

Issue#8951 (https://github.com/GreptimeTeam/greptimedb/issues/8951) 指标引擎忽略逻辑表上设置的TTL,导致OTLP指标写入提示无效

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#issue-8951-metric-engine-ignores-ttl-set-on-a-logical-table-so-the-otlp-metrics-write-hint-has-no-effect)

指标引擎接受逻辑表上的TTL设置,但随后会忽略它,因此像x-greptime-hints: ttl=180d这样的OTLP写入提示会静默失效。解决方法可以是将TTL传播到物理表,或者在CREATE TABLEALTER TABLE时以明确的错误拒绝该提示。

关键词: Table Engine, Write Protocols, SQL
难度: 中等

Issue#8620 (https://github.com/GreptimeTeam/greptimedb/issues/8620) 支持通过环境变量配置region引擎选项

(https://greptime.com/blogs/2026-08-31-greptimedb-monthly-report#issue-8620-support-configuring-region-engine-options-through-environment-variables)

目前region_engine选项只能在TOML文件中设置。等效的环境变量GREPTIMEDB_STANDALONE__REGION_ENGINE__MITO__GLOBAL_WRITE_BUFFER_REJECT_SIZE在启动时会失败,而不是被应用。需要使region引擎列表遵循与其他配置相同的分层配置映射规则。

相似文章

@Greptime: GreptimeDB v1.1.2 已发布 — 这是一个值得升级的 v1.1 补丁。主要修复:定时 Flows 现在绑定 now()/current_timest…

X AI KOLs Following

GreptimeDB v1.1.2 是一个补丁版本,修复了定时 Flows 中 now() 的绑定问题,以确保 EVAL INTERVAL 窗口的确定性。此外还修复了以下问题:Kafka SASL 密码在调试输出中的屏蔽、GC 索引文件列表、parquet 元数据缓存大小、Prometheus 标签发现扫描以及 PromQL 时间二元聚合。建议用户升级。