Technical Breakdown for Monitor: Tracing Removal

This is the technical breakdown for Monitor: Tracing Deprecation (gitlab-org/gitlab#346540 - closed).

"Tracing" today is basically just a field that we save a URL to. Navigating to Monitor > Tracing opens the saved URL in an iframe.

User impact

There are ~300 GitLab.com projects with tracing enabled, and ~300 self-managed projects on self-managed instances reporting usage. Usage data chart in sisense

Timeline

Whether or not we can complete it all in %15.0, all removal tasks are able to be rolled out in a single milestone (no milestone-blocked db operations, etc).

To guarantee we can effectively turn off the feature in %15.0, we can start by feature flagging tracing. This should protect our team's flexibility.

Phase 1 - Add feature flag (%15.0)

  • Introduce feature flag
  • Update documentation
    • Note feature flag in doc/operations/tracing.md
    • Cleanup references in doc/development/distributed_tracing.md, doc/user/project/settings/index.md

Phase 2 - Code removal (anytime after %15.2)

Frontend

Relevant files
  • app/views/projects/settings/operations/_tracing.html.haml
  • app/views/projects/settings/operations/show.html.haml
  • app/views/projects/tracings/_tracing_button.html.haml
  • app/views/projects/tracings/show.html.haml
  • spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
  • spec/views/projects/settings/operations/show.html.haml_spec.rb
  • spec/views/projects/tracing/show.html.haml_spec.rb
  • ee/app/assets/javascripts/vue_shared/survey_banner/survey_banner.stories.js
  • lib/sidebars/projects/menus/monitor_menu.rb
  • spec/lib/sidebars/projects/menus/monitor_menu_spec.rb
  • spec/support/shared_contexts/navbar_structure_context.rb
  1. Remove Settings > Monitor > Tracing UI (gitlab-org/gitlab#351388 (closed))
  2. Remove Monitor > Tracing UI

Backend (after frontend)

Relevant files
  • app/controllers/projects/settings/operations_controller.rb
  • app/controllers/projects/tracings_controller.rb
  • app/helpers/projects_helper.rb
  • app/models/project_tracing_setting.rb
  • app/models/project.rb
  • app/services/projects/operations/update_service.rb
  • config/routes/project.rb
  • ee/app/controllers/ee/projects/settings/operations_controller.rb
  • spec/controllers/projects/settings/operations_controller_spec.rb
  • spec/controllers/projects/tracings_controller_spec.rb
  • spec/factories/project_tracing_settings.rb
  • spec/factories/usage_data.rb
  • spec/features/projects/tracings_spec.rb
  • spec/lib/gitlab/usage_data_spec.rb
  • spec/models/project_spec.rb
  • spec/models/project_tracing_setting_spec.rb
  • spec/services/projects/operations/update_service_spec.rb
  • spec/support/helpers/usage_data_helpers.rb
  • .rubocop_todo/gitlab/namespaced_class.yml
  • lib/gitlab/database/gitlab_schemas.yml
  • spec/lib/gitlab/import_export/all_models.yml
  • spec/lib/gitlab/import_export/safe_model_attributes.yml
  1. Ensure removability of snowplow metrics
  2. Deprecate tracing metrics in service ping
  3. Remove tracing routes/controllers, application code
  4. Drop table & clean up database dictionary records [can be done in a post-migration in same release as removes all app code]

Assumptions & Limitations

  1. The tracing feature category isn't being removed.
  2. Direct communication with owners of impacted projects is out of scope.
  3. Even though Opstrace is using jaeger for tracing, there's nothing to be gained by retaining the data from these users. (The saved urls could be pretty much anything, and the iframe could be rendering anything. The new integration will almost certainly need a different format.
  4. Distributed tracing, Performance bar, LabKit, and GraphQL tracing are all unrelated
  5. With the number of removals in %15.0, there are decent possibilities engineers could be pulled to other tasks/teams

Issue breakdown

Monitor: Tracing Deprecation (gitlab-org/gitlab#346540 - closed) tracks this removal. Any issues added here should be represented in gitlab-org/gitlab#346540 (closed).

Issue Notes Backend Frontend
Add feature flag for tracing UI Either backend or frontend -> S
Deprecate usage ping & snowplow tracing metrics S
Remove UI at Monitor > Tracing + left nav item Should be done fullstack XS S
Remove UI at Settings > Monitor > Tracing + left nav item Either backend or frontend -> S
Remove tracing application code M
Remove tracing from database S
Edited by Sarah Yasonik