gateway: separate metrics for Signed IPNS from DNSLink

未关闭
#409 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
go
领域
observability

调研方向

从所链接的 Boxo 参考中的 gateway/metrics.go 开始,并将其现有的 gateway 指标与 bifrost-gateway/metrics.go 进行比较。解决有关标签、成功/错误统计以及持续时间测量的未决问题,然后确定这些指标将如何在 Thunderdome 测试中暴露。完成标准是:已签名的 IPNS 和 DNSLink 请求分别具有可观测的请求、结果和持续时间数据。

由索引模型根据 Issue 内容生成。

描述

dif/expert effort/hours kind/enhancement P2 topic/gateway

Extracted from https://github.com/ipfs/kubo/issues/9927#issuecomment-1623791077

Currently, we have basic request counts and durations for gateway=ipfs and gateway=ipns namespaces in the form of boxo/gateway/metrics.go metrics:

# HELP ipfs_http_gw_get_duration_seconds The time to GET a successful response to a request (all content types).
# TYPE ipfs_http_gw_get_duration_seconds histogram
ipfs_http_gw_get_duration_seconds_bucket{gateway="ipfs",le="0.05"} 8
[..]
ipfs_http_gw_get_duration_seconds_bucket{gateway="ipfs",le="1920"} 11
ipfs_http_gw_get_duration_seconds_bucket{gateway="ipfs",le="+Inf"} 11
ipfs_http_gw_get_duration_seconds_sum{gateway="ipfs"} 1.185360469
Problem
  • /ipns supports both DNSLink and Signed IPNS records – we have no visibility what is the % of each
  • we measure success only, have no visibility into % of IPNS record failures vs DNSLink failures
Solution
Requirements

TBD, initial requirements

  • we need dedicated metric for each type of /ipns/ request
    • signed_ipns
    • dnslink
  • we need to be able to tell:
    • how many requests were sent by clients
    • how many requests were successful vs errored
    • how long success / error takes? (could be precomputed P50/P95)
    • we need to make sure this is visible in Thunderdome testing so we can catch regressions here during release phase
Open questions
  • do we have a separate metrics for success/failure, or do we have single one with success/error attribute?
  • do we do histogram with predefined duration buckets and implicit counter (like ipfs_http_gw_get_duration_seconds)?
  • or maybe, instead of picking arbitrary duration buckets (like we have in legacy metrics) we should have P50, P75, P95, P99 Objectives, like we do here?
主要语言
Go
星标
326
派生
165
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipfs/boxo 的其他 Issue

查看 ipfs/boxo 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。