On 08/09/2020 13:35, Ayush Kumar wrote:
Hi Everyone,
I work with .NET Core applications and we use Prometheus along with
Grafana for dashboarding. I wanted to know if there's a way to add a
new Label to the default metrics that Prometheus has, for example:
http_requests_duration_seconds_count
This metric has a few default labels like action. I wanted to add one
more label called callerID to this for my application.
Is it possible to modify the default metrics to include new labels ?
If so, could you point me towards some documentation on how to do this ?
What is callerID?
If it is something to do with the end user calling a system then it
would be strongly advised not to have such a label - things like user
IDs, usernames or IP addresses have possibly infinite (or generally
large) cardinality and can quickly cause issues.
However if it is something to do with the service/application itself the
general approach would be to either:
1. Add such labels via relabeling in your scrape config
2. Not add the label at all, and instead use role metrics as described
at https://www.robustperception.io/how-to-have-labels-for-machine-roles
&
https://www.robustperception.io/exposing-the-software-version-to-prometheus
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/e9c6773a-e1d2-f2aa-c2d3-0d9a355b7b7a%40Jahingo.com.