Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

rahulguptajss
Copy link
Contributor

Fixes #1379

image

@@ -419,6 +419,14 @@ func (p *Prometheus) render(data *matrix.Matrix) ([][]byte, error) {

if value, ok := metric.GetValueString(instance); ok {

var description string
Copy link
Collaborator

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
Copy link
Collaborator

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))
Copy link
Collaborator

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

@rahulguptajss rahulguptajss deleted the rg2-counter branch December 12, 2022 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document Harvest metrics
2 participants