Skip to content

Enables observability auth scopes for metrics feature flag

Joe Shaw requested to merge joe/observability_scopes_enabled_metrics into master

What does this MR do and why?

Enables observability auth scopes (read_observability and write_observability) for the observability_metrics feature flag as well as the existing tracing feature flag. This is used specifically for group and project access tokens.

This change is required for showing available scopes in projects and groups where metrics is enabled, but not necessarily tracing. Though typically tracing has always been enabled first, it may not always be the case as the features roll out.

Updated tests with dynamic examples based on the observability FFs, as we will be adding at least one more (logging) to this check in the near future.

Closes gitlab-org/opstrace/opstrace#2527 (closed)

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.

How to set up and validate locally

  1. Ensure feature flags :observability_tracing, :observability_metrics are disabled.
  2. Verify that when creating a group or project access token it does not show scopes read_observability and write_observability.
  3. Enable :observability_metrics FF.
  4. Verify that the group/project has the read_observability and write_observability scopes available when creating a token.
  5. Enable :observability_tracing FF and repeat step 4.
Edited by Joe Shaw

Merge request reports