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

Adding prometheus endpoint in tron - TRON-2124 #944

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

EmanElsaban
Copy link
Contributor

@EmanElsaban EmanElsaban commented Mar 4, 2024

This PR adds prometheus endpoint at the path /api/prom-metrics and adds gauges for some of the metrics to test it out.

@EmanElsaban EmanElsaban force-pushed the u/emanelsabban/TRON-2124-expose-prom-metrics branch from 3e23199 to 6fb14d9 Compare March 4, 2024 22:01
@EmanElsaban EmanElsaban merged commit 79f0835 into master Mar 5, 2024
3 checks passed
@@ -10,6 +10,7 @@ ipython
Jinja2>=3.1.2
lockfile
moto
prometheus-client==0.20.0
Copy link
Member

Choose a reason for hiding this comment

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

we should remove this pin from requirement-minimal - leaving it in here means "any version that is not 0.20.0 will not work"

i.e., this line should just have the dependency name


tron_cpu_gauge = Gauge("tron_k8s_cpus", "Measuring CPU for tron jobs on K8s")
tron_memory_gauge = Gauge("tron_k8s_mem", "Measuring memory for tron jobs on K8s")
tron_disk_gauge = Gauge("tron_k8s_disk", "Measuring disk for tron jobs on K8s")
Copy link
Member

Choose a reason for hiding this comment

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

suggestion (feel free to ignore):

tron_cpu_gauge = Gauge("tron_k8s_cpus", "Total number of CPUs allocated to Tron-launched containers")
tron_memory_gauge = Gauge("tron_k8s_mem", "Total amount of memory allocated to Tron-launched containers (in megabytes)")
tron_disk_gauge = Gauge("tron_k8s_disk", "Total amount of disk allocated to Tron-launched containers (in megabytes)")

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.

5 participants