Add backend event tracking to Observability pages
What does this MR do and why?
Adds backend internal event tracking to the Observability feature's pages, which previously had zero instrumentation anywhere in the flow (setup → access request → settings → dashboard).
Six new events, each with a matching unique-user (7d/28d) metric:
| Event | Where | Trigger |
|---|---|---|
visit_group_observability_dashboard |
Groups::ObservabilityController#show |
Successful render branch only |
visit_project_observability_dashboard |
Projects::ObservabilityController#show |
Successful render branch only (not on 404 / redirect-to-setup) |
visit_observability_setup_page |
Observability::SetupActions#show (shared by group + project setup controllers) |
Every successful render |
create_observability_access_request |
Observability::AccessRequestActions#create (shared by group + project access-request controllers) |
Success branch only |
visit_o11y_service_settings_page |
Groups::Observability::O11yServiceSettingsController#edit |
Every page view |
update_o11y_service_settings |
Groups::Observability::O11yServiceSettingsController#update |
Success branch only |
The dashboard and setup events carry a label additional property (the observability sub-path, or the group/project context) to distinguish where in the flow the event fired.
Instrumentation uses Gitlab::InternalEventsTracking#track_internal_event directly in each controller/shared concern.
Screenshots or screen recordings
N/A — backend-only tracking, no UI changes.
How to set up and validate locally
-
Enable the observability feature flags (
observability_sass_featuresfor a group, orobservability_saas_features_user_namespacefor a personal namespace). -
Visit a group or project Observability dashboard, the setup page, and the group settings page (
/groups/<group>/-/observability/o11y_service_settings/edit). -
Check
Gitlab::InternalEventsis invoked via the Rails console or by running the added specs:bundle exec rspec \ spec/requests/groups/observability_controller_spec.rb \ spec/requests/projects/observability_controller_spec.rb \ spec/requests/groups/observability/o11y_service_settings_spec.rb \ spec/requests/groups/observability/setup_spec.rb \ spec/requests/projects/observability/setup_spec.rb \ spec/requests/groups/observability/access_requests_spec.rb \ spec/requests/projects/observability/access_requests_spec.rb
All 129 examples pass, including negative tests asserting events are not fired on 404/redirect/failure branches.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist.
Related issue: #608071