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

fix(metrics): speckle_server_apollo_calls built with correct register #3780

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Jan 8, 2025

Description & motivation

speckle_server_apollo_calls was no longer present in the Prometheus metrics. It is not known when that metric stopped being produced.

This PR fixes the metric so that it is now available when Prometheus is scraped.

Changes:

  • the metric is initialized when the plugin is initialized, not when the module is loaded
  • the metric is initialized with the Prometheus register being explicitly provided
    • (we believe the bug that is being resolved is due to the metric being registered in a different Prometheus register than the one being served at /metrics)

To-do before merge:

Screenshots:

Validation of changes:

Metric speckle_server_apollo_calls is now present when /metrics endpoint is queried:

Screenshot 2025-01-08 at 16 30 33

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link

linear bot commented Jan 8, 2025

@iainsproat iainsproat marked this pull request as ready for review January 8, 2025 16:35
@iainsproat iainsproat requested a review from gjedlicska January 8, 2025 16:35
@gjedlicska gjedlicska merged commit 8cadddf into main Jan 8, 2025
26 of 28 checks passed
@gjedlicska gjedlicska deleted the iain/cxpla-152-investigate-the-undefined-subscription-connection-and-label branch January 8, 2025 18:55
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