Commit cb26a88c authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '333117-migrate-redishll-ide-edit-events' into 'master'

Add web_edit instrumentation class

See merge request gitlab-org/gitlab!66789
parents ef1379fd 09b0864a
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_web_ide
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_sfe
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_snippet_ide
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,13 @@ value_type: number ...@@ -10,6 +10,13 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_web_ide
- g_edit_by_sfe
- g_edit_by_snippet_ide
- g_edit_by_sse
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 28d time_frame: 28d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_sse
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_web_ide
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_sfe
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_snippet_ide
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,13 @@ value_type: number ...@@ -10,6 +10,13 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_web_ide
- g_edit_by_sfe
- g_edit_by_snippet_ide
- g_edit_by_sse
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -10,6 +10,10 @@ value_type: number ...@@ -10,6 +10,10 @@ value_type: number
status: data_available status: data_available
time_frame: 7d time_frame: 7d
data_source: redis_hll data_source: redis_hll
instrumentation_class: RedisHLLMetric
options:
events:
- g_edit_by_sse
distribution: distribution:
- ce - ce
- ee - ee
......
...@@ -16,7 +16,7 @@ RSpec.describe Gitlab::UsageDataMetrics do ...@@ -16,7 +16,7 @@ RSpec.describe Gitlab::UsageDataMetrics do
allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(false) allow(ActiveRecord::Base.connection).to receive(:transaction_open?).and_return(false)
end end
context 'whith instrumentation_class' do context 'with instrumentation_class' do
it 'includes top level keys' do it 'includes top level keys' do
expect(subject).to include(:uuid) expect(subject).to include(:uuid)
expect(subject).to include(:hostname) expect(subject).to include(:hostname)
...@@ -31,6 +31,16 @@ RSpec.describe Gitlab::UsageDataMetrics do ...@@ -31,6 +31,16 @@ RSpec.describe Gitlab::UsageDataMetrics do
expect(subject[:redis_hll_counters][:quickactions]).to include(:i_quickactions_approve_weekly) expect(subject[:redis_hll_counters][:quickactions]).to include(:i_quickactions_approve_weekly)
end end
it 'includes ide_edit monthly and weekly keys' do
expect(subject[:redis_hll_counters][:ide_edit].keys).to contain_exactly(*[
:g_edit_by_web_ide_monthly, :g_edit_by_web_ide_weekly,
:g_edit_by_sfe_monthly, :g_edit_by_sfe_weekly,
:g_edit_by_sse_monthly, :g_edit_by_sse_weekly,
:g_edit_by_snippet_ide_monthly, :g_edit_by_snippet_ide_weekly,
:ide_edit_total_unique_counts_monthly, :ide_edit_total_unique_counts_weekly
])
end
it 'includes counts keys' do it 'includes counts keys' do
expect(subject[:counts]).to include(:issues) expect(subject[:counts]).to include(:issues)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment