Module: Gitlab::UsageDataCounters::EditorUniqueCounter

Defined in:
lib/gitlab/usage_data_counters/editor_unique_counter.rb

Constant Summary collapse

EDIT_BY_SNIPPET_EDITOR =
'g_edit_by_snippet_ide'
EDIT_BY_SFE =
'g_edit_by_sfe'
EDIT_BY_WEB_IDE =
'g_edit_by_web_ide'
EDIT_CATEGORY =
'ide_edit'

Class Method Summary collapse

Class Method Details

.count_sfe_edit_actions(date_from:, date_to:) ⇒ Object



24
25
26
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 24

def count_sfe_edit_actions(date_from:, date_to:)
  count_unique(EDIT_BY_SFE, date_from, date_to)
end

.count_snippet_editor_edit_actions(date_from:, date_to:) ⇒ Object



32
33
34
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 32

def count_snippet_editor_edit_actions(date_from:, date_to:)
  count_unique(EDIT_BY_SNIPPET_EDITOR, date_from, date_to)
end

.count_web_ide_edit_actions(date_from:, date_to:) ⇒ Object



16
17
18
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 16

def count_web_ide_edit_actions(date_from:, date_to:)
  count_unique(EDIT_BY_WEB_IDE, date_from, date_to)
end

.track_sfe_edit_action(author:, project:) ⇒ Object



20
21
22
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 20

def track_sfe_edit_action(author:, project:)
  track_internal_event(EDIT_BY_SFE, author, project)
end

.track_snippet_editor_edit_action(author:, project:) ⇒ Object



28
29
30
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 28

def track_snippet_editor_edit_action(author:, project:)
  track_internal_event(EDIT_BY_SNIPPET_EDITOR, author, project)
end

.track_web_ide_edit_action(author:, project:) ⇒ Object



12
13
14
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 12

def track_web_ide_edit_action(author:, project:)
  track_internal_event(EDIT_BY_WEB_IDE, author, project)
end