# Greptime 双周精选 （6.5-6.18）｜Greptime 迎来第一位正式的外部 committer！

Source: https://greptime.cn/blogs/2023-06-21-biweekly

## 内容概述

作为一个成长中的开源项目，GreptimeDB 的进展离不开来自全球的社区贡献者们，感谢各位！

过去两周，我们所有项目中共有 **47** 个 PR 被合并，以下是这段时间较为重要的 PR 总结：

- 支持将 azblob 作为后端数据存储

- 支持 Prometheus 查询时间线组合元信息的接口

- 增加 HTTP API 用于 CPU 分析

- 增加时间戳类型作为参数

## 社区贡献者名单

**特别感谢**

在此我们特别感谢 @[etolbakov](https://github.com/etolbakov)，他不断为我们的项目做出贡献，累计提交了 **17** 个 PR，有 **16** 个已被成功合并！同时过去一个月，他为我们的 issue 提供了超过 **20** 条 comments，并在 Slack 社区与我们进行互动，为我们提供宝贵的建议。因此，他将成为我们第一位正式的 committer，再次对他表示感谢与祝贺！

在过去的两周里，共有 **4 位贡献者**，累计 **4 个 PR 被成功合并**，还有很多待合并的 PR。

祝贺以下各位在过去 2 周内成为我们活跃的贡献者：

- @[etolbakov](https://github.com/etolbakov) ([db#1632](https://github.com/GreptimeTeam/greptimedb/pull/1632))

- @[NiwakaDev](https://github.com/NiwakaDev) ([db#1620](https://github.com/GreptimeTeam/greptimedb/pull/1620))

- @[QuenKar](https://github.com/QuenKar) ([db#1749](https://github.com/GreptimeTeam/greptimedb/pull/1749))

- @[WangTingZheng](https://github.com/WangTingZheng) ([db#1756](https://github.com/GreptimeTeam/greptimedb/pull/1756))

👏 欢迎 @[WangTingZheng](https://github.com/WangTingZheng) 作为新的贡献者加入到我们的社区，并都成功合并了首个 PR！

同时衷心感谢我们所有的成员和贡献者！是你们的付出让我们的项目得以成功，也是你们让 GreptimeDB 成为一个更优质的产品。让我们一起努力，建立一个更棒的社区！

## PR 亮点

### [db#1659](https://github.com/GreptimeTeam/greptimedb/pull/1659) 支持将 azblob 作为后端数据存储

Azure Blob Storage 是 Azure 提供的对象存储服务。通过这个 PR，GreptimeDB 也支持了 Azure Blob Storage：

- 增加 `ObjectStoreConfig::Azblob`，用于 azblob 对象存储配置。

- 配置后在数据节点中创建 azblob 实例。

- 在 test-integration 中添加 azblob 存储测试。

### [db#1620](https://github.com/GreptimeTeam/greptimedb/pull/1620) 支持 Prometheus 查询时间线组合元信息的接口

我们现在支持了 Prometheus 的 `/api/v1/series`。这个接口可以用来实现查询提示或补全，也是 Prometheus 提供的元信息相关接口中的一个。

### [db#1694](https://github.com/GreptimeTeam/greptimedb/pull/1694) 增加 HTTP API 用于 CPU 分析

这个 PR 增加了一个用于 CPU 分析的 HTTP API。它还重构了 mem prof 处理程序，使链式处理程序与路由的连接更容易。

以 99 赫兹采样，持续 5 秒，以 protobuf 格式输出报告:

```rust
curl -s '0:4000/v1/prof/cpu' > /tmp/pprof.out
```

以 99 赫兹采样，持续 60 秒，以火焰图格式输出报告:

```rust
curl -s '0:4000/v1/prof/cpu?seconds=60&output=flamegraph' > /tmp/pprof.svg
```

以 49 赫兹采样，持续 10 秒，以文本格式输出报告:

```rust
curl -s '0:4000/v1/prof/cpu?seconds=10&frequency=49&output=text' > /tmp/pprof.txt
```

这个功能在默认情况下是禁用的。想要启用它，需要用 pprof 功能构建二进制文件:

```rust
cargo build --features=pprof
```

因为 pprof API 需要在一个特定的时间内采样，我们必须在它之前包一层超时。这个 PR 也关闭了 TestBase 中的测试区域，这应该可以修复测试案例 `test_flush_and_reopen`。

### [db#1632](https://github.com/GreptimeTeam/greptimedb/pull/1632) 增加时间戳类型作为参数

在 `to_unixtime` 函数中增加了对时间戳类型的支持。这个函数现在可以接受字符串、32位整数、64位整数以及各种精度的时间戳作为参数。

## 新鲜事

Rust China Conf 2023 于上周末 6 月 17 日— 18 日在上海成功举办， Greptime 核心研发工程师夏锐航在 Rust China Conf 2023 的会议中分享了题为《用 Rust 重写 Prometheus 的查询引擎》的主题演讲；同时 Greptime 市场部小伙伴的线下活动也收获了大家踊跃地参与和支持。

WOT 全球技术创新大会·北京站 2023 于上周 6 月 16 日- 17 日在北京举办并获得圆满成功，Greptime 技术副总裁冯家纯有幸作为技术专家就 Greptime 产品的开发经验与参会者进行了技术分享，交流了云原生时序数据库的挑战和难点。

## 关于 Greptime

[Greptime 格睿科技](https://greptime.cn/)专注于为可观测、物联网及车联网等领域提供实时、高效的数据存储和分析服务，帮助客户挖掘数据的深层价值。目前基于云原生的时序数据库 [GreptimeDB](https://github.com/GreptimeTeam/greptimedb) 已经衍生出多款适合不同用户的解决方案，更多信息或 demo 展示请联系下方小助手（微信号：greptime）。

欢迎对开源感兴趣的朋友们参与贡献和讨论，从带有 good first issue 标签的 issue 开始你的开源之旅吧～期待在开源社群里遇见你！添加小助手微信即可加入“技术交流群”与志同道合的朋友们面对面交流哦~

Star us on GitHub Now: https://github.com/GreptimeTeam/greptimedb

官网：https://greptime.cn/

文档：https://docs.greptime.cn/

Twitter: https://twitter.com/Greptime

Slack: https://greptime.com/slack

LinkedIn: https://www.linkedin.com/company/greptime/
