Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 38,038
    • Issues 38,038
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,345
    • Merge requests 1,345
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Merge requests
  • !57270

Merged
Created Mar 23, 2021 by Piotr Skorupa@pskorupaDeveloper2 of 14 tasks completed2/14 tasks

Add unified metrics definition YAML file API endpoint

  • Overview 45
  • Commits 10
  • Pipelines 10
  • Changes 6

What does this MR do?

Part of #323548 (closed).

This adds GET /usage_data/metric_definitions API endpoint for unauthenticated users to get a unified YAML of all metric definitions. Relevant docs have been added to the Usage Ping guide.

Example response

❯ http gdk.test:3000/api/v4/usage_data/metric_definitions
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/yaml
Date: Thu, 25 Mar 2021 20:53:25 GMT
Etag: W/"f618ef6668089d6f81bf1070ce8cdf56"
Transfer-Encoding: chunked
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Gitlab-Feature-Category: usage_ping
X-Request-Id: 01F1NJKJSXPD0B3TT4AS36VTFP
X-Runtime: 0.091602
---
- key_path: redis_hll_counters.search.i_search_paid_monthly
  description: Calculated unique users to perform a search with a paid license enabled
    by month
  product_section: enablement
  product_stage: enablement
  product_group: group::global search
  product_category: global_search
  value_type: number
  status: data_available
  time_frame: 28d
  data_source: redis_hll
  distribution:
  - ee
  tier:
  - premium
  - ultimate
- key_path: search_unique_visits.i_search_advanced
  description: Calculated unique users to perform Advanced searches by week
  product_section: enablement
  product_stage: enablement
  product_group: group::global search
  product_category: global_search
  value_type: number
  status: data_available
  time_frame: all
  data_source: redis_hll
  distribution:
  - ee
  tier:
  - premium
  - ultimate
- (...)

Does this MR meet the acceptance criteria?

Conformity

  • 📋 Does this MR need a changelog?
    • I have included a changelog entry.
    • I have not included a changelog entry because _____.
  • Documentation (if required)
  • Code review guidelines
  • Merge request performance guidelines
  • Style guides
  • Database guides
  • Separation of EE specific content

Availability and Testing

  • Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
  • Tested in all supported browsers
  • Informed Infrastructure department of a default or new setting change, if applicable per definition of done

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #323548 (closed)

Edited Mar 25, 2021 by Piotr Skorupa
Assignee
Assign to
Reviewer
Request review from
13.11
Milestone
13.11 (Past due)
Assign milestone
Time tracking
Source branch: 323548-unify-metrics-definition-yaml-file-in-one-file