Skip to content

expfmt: use OpenMetrics gauge histogram sample names - #1039

Open
ViktorBystrov72 wants to merge 1 commit into
prometheus:mainfrom
ViktorBystrov72:fix/openmetrics-gauge-histogram-suffixes
Open

ViktorBystrov72 wants to merge 1 commit into
prometheus:mainfrom
ViktorBystrov72:fix/openmetrics-gauge-histogram-suffixes

Conversation

@ViktorBystrov72

Copy link
Copy Markdown

OpenMetrics 1.0 gauge histograms are currently encoded with _sum and _count series, although their declared type is gaugehistogram. Consumers following the OpenMetrics suffix rules expect _gsum and _gcount.

Use those suffixes for gauge histograms and omit _created when WithCreatedLines is enabled, since that series belongs to counter histograms. The existing gauge histogram fixture now checks the correct wire names, the byte count, and suppression of an attached creation timestamp. It fails against the parent implementation.

Validation: make test GOOPTS=-race passed with Go 1.27.3 and golangci-lint 2.14.0, including root tests, lint, license, and module-tidy checks. git diff --check passed.

@roidelapluie @gotjosh

@ViktorBystrov72
ViktorBystrov72 force-pushed the fix/openmetrics-gauge-histogram-suffixes branch 3 times, most recently from 64eee1c to 447aa99 Compare November 13, 2026 08:39
Signed-off-by: Виктор Быстров <anatema@bk.ru>
@ViktorBystrov72
ViktorBystrov72 force-pushed the fix/openmetrics-gauge-histogram-suffixes branch from 447aa99 to fdef733 Compare November 14, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant