diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-23 18:09:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-23 18:09:16 +0000 |
commit | f6b95a66bc12adeb4fac7277d1eb345d9e7819fd (patch) | |
tree | b2739bb34529d005a356df12da50c0e38caf6a52 /app/controllers/projects/blob_controller.rb | |
parent | b465b2440bbf8ac8c4ef21728ab14fb48589057c (diff) | |
download | gitlab-ce-f6b95a66bc12adeb4fac7277d1eb345d9e7819fd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/blob_controller.rb')
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index a930cb458a1..79c27904542 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -10,7 +10,7 @@ class Projects::BlobController < Projects::ApplicationController include RedirectsForMissingPathOnTree include SourcegraphDecorator include DiffHelper - include RedisTracking + include ProductAnalyticsTracking extend ::Gitlab::Utils::Override prepend_before_action :authenticate_user!, only: [:edit] @@ -37,7 +37,11 @@ class Projects::BlobController < Projects::ApplicationController before_action :validate_diff_params, only: :diff before_action :set_last_commit_sha, only: [:edit, :update] - track_redis_hll_event :create, :update, name: 'g_edit_by_sfe' + track_custom_event :create, :update, + name: 'g_edit_by_sfe', + action: 'perform_sfe_action', + label: 'usage_activity_by_stage_monthly.create.action_monthly_active_users_sfe_edit', + destinations: [:redis_hll, :snowplow] feature_category :source_code_management urgency :low, [:create, :show, :edit, :update, :diff] @@ -316,6 +320,12 @@ class Projects::BlobController < Projects::ApplicationController file = file.cdn_enabled_url(request.remote_ip) if file.respond_to?(:cdn_enabled_url) file.url end + + alias_method :tracking_project_source, :project + + def tracking_namespace_source + project&.namespace + end end Projects::BlobController.prepend_mod |