Skip to content

Use amoc_users_size metric #47

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

jacekwegr
Copy link
Contributor

@jacekwegr jacekwegr commented Jun 10, 2025

This PR adds the amoc_users_size gauge to the predefined_metrics section in both amoc_arsenal_xmpp.app and app.config.

The metric was already defined in the amoc_arsenal repository here, but it wasn't included in the configuration used during scenarios. This could cause confusion, as the metric appeared to be predefined and expected to be present, but it wasn’t actually available.

With this update, the metric is now properly configured and should work as expected during scenario runs.

@jacekwegr jacekwegr changed the title Fix amoc_users_size metric Use amoc_users_size metric Jun 10, 2025
@jacekwegr jacekwegr marked this pull request as ready for review June 10, 2025 08:07
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

From what I see, the issue came up after the commit from @NelsonVides, when exometer was replaced with Prometheus. It looks like there was an attempt to use a prometheus collector, but the implementation is lacking the function to collect metrics, and looks to be untested.

I think there are two ways to solve this:

  • either finish implementing prometheus_collector in amoc-arsenal,
  • or finish this PR, and remove the prometheus_collector callbacks from amoc-arsenal to avoid confusion.

This particular PR looks good to me, and is a workaround that might make sense at the moment. @NelsonVides - what do you think, do you think you could fix the prometheus_collector in amoc-arsenal?

@jacekwegr, how did you test that this PR is working correctly?

@jacekwegr
Copy link
Contributor Author

@jacekwegr, how did you test that this PR is working correctly?

I ran a few scenarios with a very small number of users and then used the remote console to check if Prometheus correctly reported the number of users by running the command prometheus_gauge:value(amoc_users_size) and comparing it with amoc_users_sup:count_no_of_users().

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.

2 participants