Support for: INFO type
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start with the expfmt.TextParser and TextToMetricFamilies entry points shown in the report, then inspect how metric types are recognized and rejected. Done means an endpoint containing an INFO metric is handled according to the chosen behavior—supported or skipped—without preventing the remaining metrics from being parsed.
Written by the indexing model from the issue text.
Description
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
}
- Dominant language
- Go
- Stars
- 297
- Forks
- 380
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prometheus/common
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
prometheus/common#1051 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
prometheus/common#1023 ·
Maintainers usually reply within 2 days
-
expfmt: OpenMetrics 1.0 output with a unit that is not a name suffix fails the whole scrape in PrometheusPossibly taken @itsmeasadali claimed this 42 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
prometheus/common#1005 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
prometheus/common#876 · 1 comment ·
Maintainers usually reply within 2 days
-
Feature request: Add client_assertion field for oauth2 jwt-bearer grant typePossibly taken @alliasgher claimed this 220 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
prometheus/common#869 ·
Maintainers usually reply within 2 days
All issues in prometheus/common
Similar issues
-
Difficulty 2/5 Half a day Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
keyxmakerx/Chronicle#2616 ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
internal/mcp: an exported-but-empty env var is reported as configured but never injectedPossibly taken A pull request linked to this issue is open or already merged. Opengo good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day