Support for: INFO type

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

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

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
backend

調査の方向性

レポートに示されているエントリーポイント expfmt.TextParser と TextToMetricFamilies から始め、メトリックの種類がどのように認識され、拒否されるかを調べます。INFO メトリックを含むエンドポイントが、選択した動作(サポートまたはスキップ)に従って処理され、残りのメトリックのパースを妨げない状態になれば完了です。

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

説明

Hi Valuable opensource contributer.

I'm trying to parse a prometheus endpoint from a program, unfortunately it has a INFO as first metric.
This will just errors the complete parsing of all metrics, which in turn give me no map of metrics to work with.

Are there plants to add this in the library or a plan to just skip those non supported metrics?

Version:
github.com/prometheus/common v0.52.3

Import:
github.com/prometheus/common/expfmt

Feature supported according to docs:
No

No support for the following (optional) features: info type, stateset type, gaugehistogram type.

Error:
text format parsing error in line 2: unknown metric type "info"

Code:
func ParseMetricFamily(body string) (map[string]*dto.MetricFamily, error) { var parser expfmt.TextParser mf, err := parser.TextToMetricFamilies(strings.NewReader(body)) fmt.Println(mf) if err != nil { fmt.Println(err) return nil, err } return mf, nil }

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

環境構築

はじめの一歩

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

prometheus/common のほかの issue

prometheus/common の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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