Skip to content

Make it possible to include file paths with metric definitions

Michał Wielich requested to merge michold-add-metrics-paths into master

What does this MR do and why?

Related to #478008

We want to make it possible to return file_paths from the metrics list endpoint. This is done so that we could migrate Metrics Dictionary to use this endpoint [instead of reading metrics file by file].

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Test the local metric definitions endpoint:

  1. Go to the metrics definitions endpoint: http://127.0.0.1:3000/api/v4/usage_data/metric_definitions when on master
  2. Visit the same endpoint when on this MR's branch. This should return a payload build with the same structure [although master payload can include more definitions]
  3. When on MR's branch, try passing the new query param to the request: http://127.0.0.1:3000/api/v4/usage_data/metric_definitions?include_paths=true . This should return a payload enriched with the relative file paths for the metrics.
Edited by Michał Wielich

Merge request reports

Loading