question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide raw counters metrics

See original GitHub issue

Is your feature request related to a problem? Please describe. Pulsar is offering many built-in metrics, which is pretty awesome. You can find metrics on any layer, from the pulsar-proxy to Bookkeeper. There are easy to plot within Grafana as most of the rate are already computed, for example pulsar_throughput_in is directly offering the total throughput of the namespace coming into this broker in bytes/second.

However, for some usages, metrics based on rate are not enough. For example, to bill users according to messages produced, you cannot rely on a rate, you need the raw counter associated.

Describe the solution you’d like I would like to add a new boolean to the configuration exposeTopicLevelMetricsAsCounterInPrometheus, which default is false. By setting it to true, broker will expose new counter metrics, which will be the raw counters used to compute the rates internally. The new metrics could be suffixed by _counter, for example:

  • pulsar_throughput_in_counter
  • pulsar_in_counter

and so on. We could also do the same work for any metrics which are a rate, but I think we should start with the topic metrics.

Describe alternatives you’ve considered Using the rate to compute the counter is not offering enough precision.

What do you think about it? We can discuss on the name of the parameter and the naming schemas.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
sijiecommented, Nov 26, 2019

@PierreZ +1

Can I suggest using names like “pulsar_in_bytes_total” or “pulsar_in_bytes_counter”, “pulsar_in_messages_total” or “pulsar_in_messages_counter”?

0reactions
PierreZcommented, Dec 4, 2019

Thanks, I will do this 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working With Prometheus Counter Metrics | Level Up Coding
In this article, we will look at the Prometheus counter metric and ... The insights you get from raw counter values are not...
Read more >
Prometheus Counters and how to deal with them - INNOQ
When scraping a target, Prometheus reads the current values of all provided metrics and adds them as new instant values to the appropriate ......
Read more >
Consume raw data from Metrics - Particular Software
When Performance Counters reporting and ServiceControl reporting is not enough, it's possible to consume raw metrics data by directly ...
Read more >
Prometheus how to handle counters on server - Stack Overflow
A counter is a cumulative metric that represents a single numerical value that only ever goes up. so now to keep track of...
Read more >
Cumulative Counters and Delta Counters
It often makes sense to collect both counter metrics and delta counter metrics ... My_ID to see the trend in checking frequency instead...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found