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

Add metric to track unique metric names the exporter is tracking #200

Merged
merged 2 commits into from
Apr 16, 2019

Conversation

bakins
Copy link
Contributor

@bakins bakins commented Apr 10, 2019

Currently, we track the number of mappings, but not the unique metricNames. This adds a simple counter to track the count of metricName+labelNames. If this number increases significantly, then the application sending metrics may be misbehaving. This does not count unique label values.

I didn't see a way to get this in the current metrics, so please let me know if there is an existing way to get this information.

Signed-off-by: Brian Akins <brian@akins.org>
Copy link
Contributor

@matthiasr matthiasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics can also disappear – at the moment this only counts up all the metrics ever seen. I think that's okay, but maybe both are useful? The current count would be a gauge.

@matthiasr
Copy link
Contributor

Would it be valuable to break this down by type (gauge/counter/summary/histogram)?

@bakins
Copy link
Contributor Author

bakins commented Apr 12, 2019

I can add a label per type, fix the decrement, and make it a gauge. I was thinking of a slightly different approach as well. This was a quick PR to gauge interest.

@matthiasr
Copy link
Contributor

I think this is a useful thing to track!

Copy link
Contributor

@matthiasr matthiasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and ready to go, can you take care of the DCO sign-off please?

Signed-off-by: Brian Akins <brian@akins.org>
@bakins
Copy link
Contributor Author

bakins commented Apr 16, 2019

@matthiasr done. Sorry, I keep forgetting to do that.

@matthiasr
Copy link
Contributor

I use an alias so I don't forget 😅

@matthiasr matthiasr merged commit 526a81b into prometheus:master Apr 16, 2019
matthiasr pushed a commit that referenced this pull request Apr 16, 2019
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
@bakins bakins deleted the metrics-count branch April 16, 2019 16:30
matthiasr pushed a commit that referenced this pull request May 15, 2019
* [CHANGE] Do not run as root in the Docker container by default ([#202](#202))
* [FEATURE] Add metric for count of events by action ([#193](#193))
* [FEATURE] Add metric for count of distinct metric names ([#200](#200))
* [FEATURE] Add UNIX socket listener support ([#199](#199))
* [FEATURE] Accept Datadog [distributions](https://docs.datadoghq.com/graphing/metrics/distributions/) ([#211](#211))
* [ENHANCEMENT] Add a health check to the Docker container ([#182](#182))
* [ENHANCEMENT] Allow inconsistent label sets ([#194](#194))
* [ENHANCEMENT] Speed up sanitization of metric names ([#197](#197))
* [ENHANCEMENT] Enable pprof endpoints ([#205](#205))
* [ENHANCEMENT] DogStatsD tag parsing is faster ([#210](#210))
* [ENHANCEMENT] Cache mapped metrics ([#198](#198))
* [BUGFIX] Fix panic if a mapping resulted in an empty name ([#192](#192))
* [BUGFIX] Ensure that there are always default quantiles if using summaries ([#212](#212))
* [BUGFIX] Prevent ingesting conflicting metric types that would make scraping fail ([#213](#213))

With #192, the count of events rejected because of negative counter increments has moved into the `statsd_exporter_events_error_total` metric, instead of being lumped in with the different kinds of successful events.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants