Skip to content
代码片段 群组 项目
未验证 提交 60e3f99c 编辑于 作者: Vladimir Shushlin's avatar Vladimir Shushlin 提交者: GitLab
浏览文件

Merge branch 'pedropombeiro/425791/add-counter' into 'master'

No related branches found
No related tags found
无相关合并请求
......@@ -21,6 +21,8 @@ def initialize(current_user:, runner_type:, from_date:, to_date:, max_project_co
end
def execute
Gitlab::InternalEvents.track_event('export_runner_usage_by_project_as_csv', user: @current_user)
result = process_csv
return result if result.error?
......
---
description: Export runner usage as CSV
category: InternalEventTracking
action: export_runner_usage_by_project_as_csv
identifiers:
- user
product_section: ci
product_stage: verify
product_group: runner
milestone: '16.9'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142328
distributions:
- ee
tiers:
- ultimate
---
key_path: counts.count_total_export_runner_usage_by_project_as_csv_monthly
description: Monthly count of Runner usage CSV report exports
product_section: ci
product_stage: verify
product_group: runner
performance_indicator_type: []
value_type: number
status: active
milestone: '16.9'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142328
time_frame: 28d
data_source: internal_events
data_category: optional
distribution:
- ee
tier:
- ultimate
options:
events:
- export_runner_usage_by_project_as_csv
events:
- name: export_runner_usage_by_project_as_csv
---
key_path: counts.count_total_export_runner_usage_by_project_as_csv_weekly
description: Weekly count of Runner usage CSV report exports
product_section: ci
product_stage: verify
product_group: runner
performance_indicator_type: []
value_type: number
status: active
milestone: '16.9'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142328
time_frame: 7d
data_source: internal_events
data_category: optional
distribution:
- ee
tier:
- ultimate
options:
events:
- export_runner_usage_by_project_as_csv
events:
- name: export_runner_usage_by_project_as_csv
......@@ -47,6 +47,13 @@
expect(response.payload).to eq({ status: expected_status })
end
it 'creates tracking event' do
expect(Gitlab::InternalEvents).to receive(:track_event)
.with('export_runner_usage_by_project_as_csv', user: current_user)
response
end
it 'creates audit event' do
expect(Gitlab::Audit::Auditor).to receive(:audit).with(
a_hash_including(
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册