# Greptime 双周精选 （5.8-5.21）｜ 支持 tokio-console 连接 GreptimeDB，问题排查更便捷

Source: https://greptime.cn/blogs/2023-05-24-biweekly

## 内容概述

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

以下是这段时间较为重要的 PR 总结：

- 支持 `TQL EXPLAIN` / `TQL ANALYZE` 从句

- 支持启用 Tokio 控制台

- 增加对 Prometheus HTTP API 方法的支持

## 社区贡献者名单

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

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

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

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

- @[haohuaijin](https://github.com/haohuaijin) ([db#1571](https://github.com/GreptimeTeam/greptimedb/pull/1571) [db#1580](https://github.com/GreptimeTeam/greptimedb/pull/1580))

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

- @[gitccl](https://github.com/gitccl) ([db#1527](https://github.com/GreptimeTeam/greptimedb/pull/1527) [docs#348](https://github.com/GreptimeTeam/docs/pull/348/))

- @[Taylor-lagrange](https://github.com/Taylor-lagrange) ([db#1497](https://github.com/GreptimeTeam/greptimedb/pull/1497) [db#1579](https://github.com/GreptimeTeam/greptimedb/pull/1579))

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

在此特别感谢 @[etolbakov](https://github.com/etolbakov)，他不断为我们的项目做出贡献，累计提交了 15 个 PR，有 14 个已被成功合并！

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

## PR 亮点

### [db#1427](https://github.com/GreptimeTeam/greptimedb/pull/1427) 支持 `TQL EXPLAIN` / `TQL ANALYZE` 从句

- `TQL EXPLAIN`（类似于 `SQL` 中的 `EXPLAIN`）不执行查询，而是解释查询将如何执行。

- `TQL ANALYZE`（类似于 `SQL` 中的 `ANALYZE`）执行计划并显示详细的每个步骤执行时间。

### [db#1512](https://github.com/GreptimeTeam/greptimedb/pull/1512) 支持启用 Tokio 控制台

现在 `tokio-console` 可以连接 GreptimeDB 了（见 https://docs.greptime.com/developer-guide/how-to/how-to-use-tokio-console），所有 Tokio 的 tasks 现在可以很方便地展现出来，对我们排查 tokio runtime 的问题很有帮助。

Tokio 控制台截图：

<figure>
<img src="/zh/blogs/2023-05-24-biweekly/image1.png" alt="（图 1：Tokio 控制台截图）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 1：Tokio 控制台截图）</figcaption>
</figure>

### [db#1016](https://github.com/GreptimeTeam/greptimedb/pull/1016) 增加对 Prometheus HTTP API 方法的支持

如 Prometheus HTTP API 描述的那样，除了 `query` 和 `query_range` 端点之外，还有一些其他有用的端点，能帮助 Prometheus 用户探索数据集的元数据或细节。同时这些端点将帮助 GreptimeDB 作为 Prometheus 服务更顺利地集成到其他系统中。

```rust
curl 'localhost:9090/api/v1/labels'
{
    "status": "success",
    "data": [
        "__name__",
        "call",
        "code",
        "config",
        "dialer_name",
        "endpoint",
        "event",
        "goversion",
        "handler",
        "instance",
        "interval",
        "job",
        "le",
        "listener_name",
        "name",
        "quantile",
        "reason",
        "role",
        "scrape_job",
        "slice",
        "version"
    ]
}
```

## 新鲜事

**GreptimeDB v0.3 预计将在 6 月初与大家见面啦**！

v0.3 会是一个初步可以试用的分布式版本，它具备了 region 粒度的服务高可用（数据高可靠还待后续版本完成），重点场景的分布式查询（重点是 PromQL 查询方向）和写入性能均达到或者略微超过主流同类数据库性能的水位线。

**欢迎大家持续关注我们的最新动态，也欢迎大家试用 GreptimeDB v0.3**！

同时，我们非常高兴 GreptimeDB 的 Prometheus 兼容性测试结果已经达到了 66.61%，大大提升了 PromQL 的兼容性，感谢大家的支持与付出！

> **GreptimeDB 社区治理准则开源啦，欢迎共建**
>
> 为了促进各团队之间的合作，并在 Greptime 社区内打造良好的社区文化，需要有标准化的社区指南，以便成员能够更快地建立信任，并专注于我们社区的长期可持续发展。
>
> 无论你是开发者、架构师、设计师、技术写手，还是对开源项目充满热情的建设者，都可以在我们的社区施展才华！更多社区详情：https://github.com/GreptimeTeam/Community。
>
>
> 如果你有任何改进本指南的建议，可以提出 PR 或将修改建议发到这个邮箱：community@greptime.com。我们非常欢迎你分享想法，让我们一起共创一个充满活力、更具包容性的社区!


## 关于 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/
