-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose perf metric counter description and units #1597
Conversation
@@ -419,6 +419,14 @@ func (p *Prometheus) render(data *matrix.Matrix) ([][]byte, error) { | |||
|
|||
if value, ok := metric.GetValueString(instance); ok { | |||
|
|||
var description string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap in if p.addMetaTags
since we only include this with meta
@@ -485,6 +493,14 @@ func (p *Prometheus) render(data *matrix.Matrix) ([][]byte, error) { | |||
metric := h.metric | |||
bucketNames := metric.Buckets() | |||
objectMetric := data.Object + "_" + metric.GetName() | |||
var description string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap in if p.addMetaTags
since we only include this with meta
@@ -505,7 +521,7 @@ func (p *Prometheus) render(data *matrix.Matrix) ([][]byte, error) { | |||
|
|||
if p.addMetaTags && !tagged.Has(prefix+"_"+metric.GetName()) { | |||
tagged.Add(prefix + "_" + metric.GetName()) | |||
rendered = append(rendered, []byte("# HELP "+prefix+"_"+metric.GetName()+" Metric for "+data.Object)) | |||
rendered = append(rendered, []byte("# HELP "+prefix+"_"+metric.GetName()+description+" OBJECT: "+data.Object)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think histograms need more work on the zapiperf and restpef side. Thinking that we should probably include the labels as part of the text
Fixes #1379