Skip to content

Conversation

@sophia-chen-ttd
Copy link
Contributor

Most of the uid2 Vertx apps filter out junk paths from Prometheus metrics with a predefined meter filter, however:

  • This meter filter logic is duplicated in all our services
  • There’s no test coverage for the meter filter logic
  • There’s a bug in this filter where if a path has bad encoding, an IllegalArgumentException is thrown, causing us to put the junk path in our metrics

Here, the path normalisation and filtering have been refactored into Shared so it can be used by all apps.
High level tests have been created to ensure the intended behaviour:

  • paths that have invalid encoding are filtered as a new bucket '/parsing_error'
  • paths that match those in a valid path set are normalised
  • paths that do not match those in a valid set are filtered as '/unknown'

@sophia-chen-ttd sophia-chen-ttd merged commit 0687cdc into main Jan 2, 2025
3 checks passed
@sophia-chen-ttd sophia-chen-ttd deleted the sch-UID2-4073-high-level-tests-path-normalisation-metrics branch January 2, 2025 01:03
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