Enables observability auth scopes for metrics feature flag
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
- Ensure feature flags
:observability_tracing, :observability_metrics
are disabled. - Verify that when creating a group or project access token it does not show scopes
read_observability
andwrite_observability
. - Enable
:observability_metrics
FF. - Verify that the group/project has the
read_observability
andwrite_observability
scopes available when creating a token. - Enable
:observability_tracing
FF and repeat step 4.