Potential bug in text parser

Open
#253 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@NopeCharon is already working on this.

Since Oct 29, 2026.

  • #1025 by @NopeCharon — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start in expfmt/text_parse.go around the HELP-line handling near the referenced lines, and reproduce parsing for the signal_info and signal_info_count histograms. Trace how the _count suffix affects p.currentMF and the later parser error. Done means both metric names are retained distinctly and the input parses without that error.

Written by the indexing model from the issue text.

Description

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

Dominant language
Go
Stars
297
Forks
380
Avg merge
3d 18h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from prometheus/common

All issues in prometheus/common

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.