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

New and updated Prometheus metrics #3844

Merged
merged 7 commits into from
Aug 15, 2024
Merged

Commits on Aug 12, 2024

  1. Configuration menu
    Copy the full SHA
    5225f54 View commit details
    Browse the repository at this point in the history
  2. Update collection-related Prometheus metrics

    Previously, there was one `aleph_collections` metric with a `category` label. In addition to collection counts by category, we also want to track collection counts by country and languages. In order to keep metric cardinalities under control, I've decided to split the `aleph_collections` metric into three separate metrics: `aleph_collection_categories`, `aleph_collection_countries`, and `aleph_collection_languages`.
    
    Each of these metrics has one additional label `type` which can be either `dataset` or `casefile`. This allows to query for the datasets or investigations in a particular language or related to a particular country.
    
    I have also removed the `category` label from the `aleph_collection_users` metric as it wasn't that useful.
    tillprochaska committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    da01ce5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9714619 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b659a20 View commit details
    Browse the repository at this point in the history
  5. Fix typo

    tillprochaska committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    eecde50 View commit details
    Browse the repository at this point in the history
  6. Add auth_method label for request-related Prometheus metrics

    This allows us to get a better understanding of API requests that originate from the UI and requests from third parties using an API key.
    tillprochaska committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    35b99b2 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Fix phone numbers used in tests

    This test started to fail with an upgrade of the `phonenumbers` package (imported via `followthemoney`) which included updated phone number validation rules. As a result, the phone numbers in this test case didn’t pass validation anymore and were cleaned from the entites created.
    
    At first glance these numbers seemed to be valid German mobile phone numbers and I was worried that there might be a regression in `phonenumbers`. But according to the International Telecommunication Union, a phone number with the prefix `176` has to be 11 digits long. I adjusted the tests accordingly.
    
    https://www.itu.int/oth/T0202000051/en
    tillprochaska committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    6de774d View commit details
    Browse the repository at this point in the history