Closed vothanhbinhlt closed 1 year ago
I haven't gotten around to using this myself yet, so I'm not sure.
/cc @karlodwyer @voltbit
Hello, I love to see the name @voltbit here. I watched the seminar of Grafana where they use his fork repo of this repo in it. I downloaded the lab of the seminar and try to follow the same which @voltbit did. Unfortunately, It has not worked on my project with nestjs and typescript
I ran the example/exemplars.js code with master
and with the commit that introduced the exemplars 9e49ee6378e8e1632321ef401db827df24291c2b
and the code on the commit outputs the exemplars correctly.
As far as I can tell the regression was introduced with a19a1ad653a5c4f286ce21cc25e198dcebdd03df
.
The test for exemplars should have caught that tho 😬.
Huh, sounds like something tests should have caught
EDIT: heh, like your edit says
On 12 Mar 2023, 14:07 +0100, Andrei Dobre @.***>, wrote:
I ran the example/exemplars.js code with master and with the commit that introduced the exemplars 9e49ee6378e8e1632321ef401db827df24291c2b and the code on the commit outputs the exemplars correctly. As far as I can tell the regression was introduced with a19a1ad653a5c4f286ce21cc25e198dcebdd03df. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
The exemplar is supposed to be on the same line as the metric, right? Looks like a pretty easy fix at least, just concat the strings before pushing into values
.
L.E. I added a fix and a test in the PR above. cc @ngavalas
For the moment I have just opened a PR with a proper snapshot test for the exemplars, it successfully fails on master and passes on the openmetrics commit (just for reference, the test should be added on the PR that brings the fix, I'll work on it tomorrow evening if nobody picks it up).
Hello guys, I tried the patch "prom-client": "github:voltbit/prom-client#improve-exemplars-tests",
, and It worked perfectly. I think you guys should merged to the main branch
Hello everyone. First, I would like to thank you for merging PR to support exemplars in this package. I am very excited. I am trying version 15.0 in my current project and fact with an issuer of metrics rendering here is an example:
We are using: typescript version 4.8.4 and nestjs framework
Results
you can see the result has some unexpected new-lines with Exemplars. Therefore, Prometheus said
"INVALID" " " is not a valid start token
Do I miss anything? please help me, I am very waiting for this feature