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

Feature(new_metrics): go-collector supports to collect and expose the metrics to Prometheus #1820

Open
empiredan opened this issue Dec 29, 2023 · 0 comments
Labels
type/enhancement Indicates new feature requests

Comments

@empiredan
Copy link
Contributor

empiredan commented Dec 29, 2023

1. Prometheus metrics of old framework

In the old framework, all the metrics have the identical metric labels. The only difference is that for those metrics which have no attributes of app and partition, their values will be left empty as following example:

zion_profiler_RPC_RRDB_RRDB_GET_qps{cluster="pegasus_cluster",host_name="abc.xyz",pegasus_job="replica",port="34601",service="pegasus",app="",partition=""} 0.000000

For those metrics which have attributes of app and partition their values will certainly left non-empty:

replica_app_pegasus_get_qps{cluster="pegasus_cluster",host_name="abc.xyz",pegasus_job="replica",port="34801",service="pegasus",app="4",partition="2"} 0.000000

2. The Design of Prometheus metrics of new framework

Referring to the old framework and the features of new metrics system, the new Prometheus labels could be designed as below:

Label name Description Metric types Entities
cluster cluster name - -
role role name, i.e. meta/replica - -
host hostname of the server - -
port the port of the role instance - -
entity such as server/table/replica ... - -
table table id - for table/partition/replica entity
partition partition id - for partition/replica entity
p the percentile, for example the value may be "90", "95", "999" only for Percentile -
task the task name - only for profiler entity
dir the disk directory - only for disk entity
queue the queue name - only for queue entity
policy the policy name - only for backup_policy entity
tracer the latency_tracer description - only for latency_tracer entity
start the starting point of latency_trace - only for latency_tracer entity
end the end point of latency_tracer - only for latency_tracer entity
@empiredan empiredan added the type/enhancement Indicates new feature requests label Dec 29, 2023
@empiredan empiredan changed the title Feature(new_metrics): go-collector collect the metrics from meta server and replica Feature(new_metrics): go-collector collects the metrics from meta server and replica server Dec 29, 2023
@empiredan empiredan changed the title Feature(new_metrics): go-collector collects the metrics from meta server and replica server Feature(new_metrics): go-collector supports to collect and expose the metrics to Prometheus Dec 29, 2023
empiredan added a commit that referenced this issue Jan 5, 2024
…uery (#1827)

#1820

Labels are needed by metric models like Prometheus Data Model.
Therefore, cluster name, role name, host name and port should be
provided in the response to metrics query as the labels. All of these
fields would be added in the form of name/value pairs of json object.

Original entity array would be the value of a json object with name
"entities".
empiredan pushed a commit that referenced this issue Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

1 participant