Potential bug in text parser

オープン
#253 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@NopeCharon がすでに取り組んでいます。

2026年10月29日 から。

  • #1025 @NopeCharon による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go

調査の方向性

参照されている行の近くにあるHELP行の処理を確認するため、expfmt/text_parse.goから始め、signal_infoとsignal_info_countのヒストグラムについて同じパース処理を再現します。_countサフィックスがp.currentMFと後続のparser errorにどのように影響するかを追跡します。両方のメトリクス名が区別されたまま保持され、入力がそのエラーなしでパースできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

We use the text parser within our application to scrape prometheus metrics and are facing an issue related to one described here: https://github.com/uber/cadence/issues/3120

cadence exposes two histogram metrics named signal_info and signal_info_count.

When parsing the HELP line for the signal_info_count the parser appears to strip the _count suffix and sets the p.currentMF property: https://github.com/prometheus/common/blob/f39dfa2b000545b3a763b844012958c275a62266/expfmt/text_parse.go#L688

This ends up setting the property to the earlier signal_info histogram leading to the parser error here:
https://github.com/prometheus/common/blob/f39dfa2b000545b3a763b844012958c275a62266/expfmt/text_parse.go#L485

主要言語
Go
スター
297
フォーク
380
平均マージ
3日 15時間
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

prometheus/common のほかの issue

prometheus/common の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。