You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
can generate malformed data by creating a duplicate Counter #97
# HELP foo bar
# TYPE foo counter
foo{baz="1",stuff="2"} 1.0
# HELP foo bar
# TYPE foo counter
foo{baz="3",stuff="4"} 2.0
Response sent from the push gateway:
text format parsing error in line 4: second HELP line for metric name "foo"
I'd prefer either getting an error from prometheus_client telling me that I can't add two identical metrics. Alternatively, I'd like for prometheus_client to merge the two metrics and not send two identical HELP lines.
It wasn't an attempt to sound glib, I do not know the architecture, and am unable to guess at the complexity involved. This was more of an attempt to encourage the reporter to maybe contribute a patch for the specific issue experienced.
Activity
grobie commentedon Aug 26, 2016
At least client_golang and client_ruby do check for metric uniqueness during registration.
rud commentedon Sep 27, 2016
I think a small merge-request would be appreciated here - any takers?
brian-brazil commentedon Sep 27, 2016
This is more complicated than it might seem at a first glance.
rud commentedon Sep 27, 2016
It wasn't an attempt to sound glib, I do not know the architecture, and am unable to guess at the complexity involved. This was more of an attempt to encourage the reporter to maybe contribute a patch for the specific issue experienced.
mad01 commentedon Oct 28, 2016
can you do something to merge it in the generate_latest function maybe?
brian-brazil commentedon Oct 28, 2016
It is an error state, it should be handled at registration time.