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

prometheus metric is malformed #1686

Closed
jasonschroeder-sfdc opened this issue Mar 27, 2024 · 1 comment · Fixed by #1693
Closed

prometheus metric is malformed #1686

jasonschroeder-sfdc opened this issue Mar 27, 2024 · 1 comment · Fixed by #1693
Assignees
Labels
Milestone

Comments

@jasonschroeder-sfdc
Copy link
Collaborator

jasonschroeder-sfdc commented Mar 27, 2024

steps to reproduce:

  1. bazelisk run //src/main/java/build/buildfarm:buildfarm-server -- --jvm_flag=-Djava.util.logging.config.file=$PWD/examples/logging.properties $PWD/examples/config.minimal.yml
  2. curl localhost:9090 | grep queue_size

Expected:

queue_size{queue_name="cpu",} 0.0

Actual:

queue_size{queue_name="{}cpu",} 0.0

Something seems broken with

private void updateQueueSizes(List<QueueStatus> queues) {
if (queueSize != null) {
for (QueueStatus queueStatus : queues) {
queueSize.labels(queueStatus.getName()).set(queueStatus.getSize());
}
}
}

@jasonschroeder-sfdc
Copy link
Collaborator Author

The name is mangled here:

// build proto
return QueueStatus.newBuilder()
.setName(RedisHashtags.hashedName(name, originalHashtag))
.setSize(size)
.addAllInternalSizes(sizes.build())
.build();

379         setName(RedisHashTags.hashedName("cpu", ""))

returns:

{}cpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment