下载PDF
ClickHouse > 实例探究 > 利用 ClickHouse 进行高效的 OpenTelemetry 跟踪:Resmo 案例研究
ClickHouse Logo

Leveraging ClickHouse for Efficient OpenTelemetry Tracing: A Resmo Case Study

技术
  • 应用基础设施与中间件 - 数据库管理和存储
  • 基础设施即服务 (IaaS) - 云存储服务
适用行业
  • 设备与机械
  • 零售
用例
  • 入侵检测系统
  • 时间敏感网络
服务
  • 系统集成
挑战
Resmo 是一种使用 API 从云和 SaaS 工具收集配置数据的工具,在管理从数千个 API 收集数据而产生的大量网络调用方面面临着重大挑战。传统的日志方法过于冗长且难以查询,而聚合指标缺乏足够的上下文来检测和诊断特定问题。 Resmo 利用跟踪,可以更好地了解请求流及其相关响应。然而,Resmo 的数据收集生成的跨度量过多,并且通常的采样方法可能会导致盲点,从而难以识别很少发生的不愉快执行路径上的问题。此外,许多供应商按摄取的事件数量和每 GB 数据量收费,如果不进行任何采样,成本可能会很高。只有少数供应商允许对数据进行自定义 SQL 查询。
关于客户
Resmo 是一种使用 API 从云和 SaaS 工具收集配置数据的工具。它允许用户使用 SQL 探索这些数据并提出他们想要的任何问题。 Resmo 附带数千个预构建的基于 SQL 的规则和问题,还提供通过过滤器、自由文本搜索或图形对收集的数据进行可视化探索的功能。当数据或规则状态发生变化时,客户可以创建自己的规则或使用自动化通过各种渠道接收通知。 Resmo 的数据收集每天会产生超过 3 亿个跨度,并且这个数字随着客户规模的增长而迅速增加。
解决方案
Resmo 决定将完整跟踪(无采样)与 OpenTelemetry 和 ClickHouse 结合使用,以实现经济高效且高效的跟踪存储和查询。最初,他们考虑使用 S3 和 Athena,但 Athena 2-3 秒的固定启动延迟是一个缺点。他们托管了自己的 ClickHouse 实例,这使他们能够以 92% 的压缩率存储超过 40 亿个跨度。为了提高常见查询的性能,他们为查询、监视器和仪表板中的常用字段添加了具体化列。他们还使用 Opentelemetry Collector 的开箱即用配置与 ClickHouse 和 Java 代理进行分布式跟踪,以上下文特定标签的形式向其跨度添加手动检测。他们将 ClickHouse 连接到 Postgres 进行可观察性查询,将其跨度中的用户和租户 ID 连接到 Postgres 数据库中的实际帐户名称和帐户状态。为了可视化数据,他们使用 Grafana,为了编写查询,他们使用 IntelliJ IDEA 和 DataGrip。
运营影响
  • The implementation of ClickHouse and OpenTelemetry for full tracing has significantly improved Resmo's observability game. The solution has allowed Resmo to efficiently store and query traces, providing a better view of the flow of requests and their associated responses. The addition of materialized columns for frequently used fields has significantly improved query performance without affecting storage or the compression rate. The ability to connect ClickHouse to Postgres has enabled Resmo to use it in their observability queries, joining user and tenant IDs in their spans to the actual account names and account status in the Postgres database. This has provided unprecedented flexibility and allowed Resmo to expose this flexibility to their customers so they can easily ask arbitrary questions. The use of Grafana for visualizing data and IntelliJ IDEA & DataGrip for writing queries has further enhanced the efficiency and effectiveness of Resmo's observability strategy.
数量效益
  • Resmo's ClickHouse instance can store more than 4 billion spans.
  • The data stored in ClickHouse consumes 275 GiB on disk, which uncompressed is 3.40 TiB - a 92% compression percentage.
  • Queries which scan all of the data complete rather quickly, and are mostly limited by the disk bandwidth.

相关案例.

联系我们

欢迎与我们交流!

* Required
* Required
* Required
* Invalid email address
提交此表单,即表示您同意 IoT ONE 可以与您联系并分享洞察和营销信息。
不,谢谢,我不想收到来自 IoT ONE 的任何营销电子邮件。
提交

Thank you for your message!
We will contact you soon.