Skip to content

Conversation

Litarnus
Copy link
Contributor

@Litarnus Litarnus commented Mar 4, 2025

This PR extends the autoscaling endpoint by adding service utilization metrics with the service name as the label.

@Litarnus Litarnus marked this pull request as ready for review March 4, 2025 13:31
@Litarnus Litarnus requested a review from a team as a code owner March 4, 2025 13:31
Comment on lines +67 to +71
fn extract_service_name(full_name: &str) -> &str {
full_name
.rsplit_once(':')
.map(|(_, s)| s)
.unwrap_or(full_name)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a problem with keeping the full name?

Copy link
Contributor Author

@Litarnus Litarnus Mar 5, 2025

Choose a reason for hiding this comment

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

I did this for two reasons:

  • Without the structure present in the full name we can refactor the location of a service without breaking or having to touch the metric
  • PromQL queries have less noise in them

@Litarnus Litarnus merged commit cac0ba4 into master Mar 6, 2025
25 checks passed
@Litarnus Litarnus deleted the martinl/service-utilization-metrics-autoscaling branch March 6, 2025 13:39
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.

3 participants