prometheus / prometheus/client_python

OpenMetrics version header out-of-date / Support latest OpenMetrics format

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

还没有人认领这个 Issue。

主要语言
Python
星标
4.4k
派生
876
平均合并
8 天 4 小时
30 天内合并 PR
1

描述

Hi,
Looking at the Content-Type header

CONTENT_TYPE_LATEST = 'application/openmetrics-text; version=0.0.1; charset=utf-8'

The version=0.0.1 should be bumped. Looking at the spec:

The content type MUST be: application/openmetrics-text; version=1.0.0; charset=utf-8

I'm afraid I haven't been able to find any clear doc detailing changes between 0.0.1 and 1.0.0 so I don't know if it's as simple as just updating that line.

FWIW I've seen other places encountering the same trouble with the MUST restriction: prometheus/prometheus#9430, prometheus/client_java#702

贡献指南

打开贡献指南

从这里开始

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

调研方向

从 prometheus_client/openmetrics/exposition.py 中的 CONTENT_TYPE_LATEST 开始,将其 header 与 issue 中链接的 OpenMetrics 规范进行比较。确定从 0.0.1 更改为 1.0.0 是否需要进行 header 更新之外的其他改动;当 client 支持最新的必需格式,且不与所引用的兼容性问题相矛盾时,即表示完成。

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

评估

技术栈
python
领域
observability
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

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