Closed peterfajdiga closed 5 years ago
That's in line with https://prometheus.io/docs/instrumenting/writing_clientlibs/#metric-description-and-help .
In short: Help strings are mandatory. The exposition format tolerates if they are missing, but the client libraries enforce a help string – with the concession that the string might have length zero.
That explains it. Thanks for the reply and sorry for opening this non-issue.
common/text_create.go is designed to not output the Help comment if MetricFamily.Help is nil: https://github.com/prometheus/common/blob/master/expfmt/text_create.go#L98
I don't, however, see a way to set it to nil in client_golang. Desc.help can only hold an empty string, but that still results in the Help comment being outputted.
Behavior observed in version v1.0.0