Commit 47b5102b authored by Alina Mihaila's avatar Alina Mihaila Committed by Mike Jang

Add feature to know_events.yml

  - Add feature attribute, corelate specific event
    with the corresponding feature flag.
  - Add docs
parent 302eef2b
...@@ -312,6 +312,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF ...@@ -312,6 +312,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
- `aggregation`: aggregation `:daily` or `:weekly`. The argument defines how we build the Redis - `aggregation`: aggregation `:daily` or `:weekly`. The argument defines how we build the Redis
keys for data storage. For `daily` we keep a key for metric per day of the year, for `weekly` we keys for data storage. For `daily` we keep a key for metric per day of the year, for `weekly` we
keep a key for metric per week of the year. keep a key for metric per week of the year.
- `feature_flag`: optional. For details, see our [GitLab internal Feature flags](../feature_flags/) documentation.
1. Track event in controller using `RedisTracking` module with `track_redis_hll_event(*controller_actions, name:, feature:, feature_default_enabled: false)`. 1. Track event in controller using `RedisTracking` module with `track_redis_hll_event(*controller_actions, name:, feature:, feature_default_enabled: false)`.
...@@ -402,7 +403,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF ...@@ -402,7 +403,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
| `event` | string | yes | The event name it should be tracked | | `event` | string | yes | The event name it should be tracked |
Response Response
w
Return 200 if tracking failed for any reason. Return 200 if tracking failed for any reason.
- `200` if event was tracked or any errors - `200` if event was tracked or any errors
...@@ -445,6 +446,20 @@ Recommendations: ...@@ -445,6 +446,20 @@ Recommendations:
- Use a [feature flag](../../operations/feature_flags.md) to have a control over the impact when - Use a [feature flag](../../operations/feature_flags.md) to have a control over the impact when
adding new metrics. adding new metrics.
##### Enable/Disable Redis HLL tracking
Events are tracked behind [feature flags](../feature_flags/index.md) due to concerns for Redis performance and scalability.
For a full list of events and coresponding feature flags see, [known_events](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/usage_data_counters/known_events/) files.
To enable or disable tracking for specific event within <https://gitlab.com> or <https://staging.gitlab.com>, run commands such as the following to
[enable or disable the corresponding feature](../feature_flags/index.md).
```shell
/chatops run feature set <feature_name> true
/chatops run feature set <feature_name> false
```
##### Known events in usage data payload ##### Known events in usage data payload
All events added in [`known_events/common.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/usage_data_counters/known_events/common.yml) are automatically added to usage data generation under the `redis_hll_counters` key. This column is stored in [version-app as a JSON](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/db/schema.rb#L209). All events added in [`known_events/common.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/usage_data_counters/known_events/common.yml) are automatically added to usage data generation under the `redis_hll_counters` key. This column is stored in [version-app as a JSON](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/db/schema.rb#L209).
......
...@@ -34,6 +34,7 @@ module Gitlab ...@@ -34,6 +34,7 @@ module Gitlab
# category: compliance # Group events in categories # category: compliance # Group events in categories
# expiry: 29 # Optional expiration time in days, default value 29 days for daily and 6.weeks for weekly # expiry: 29 # Optional expiration time in days, default value 29 days for daily and 6.weeks for weekly
# aggregation: daily # Aggregation level, keys are stored daily or weekly # aggregation: daily # Aggregation level, keys are stored daily or weekly
# feature_flag: # The event feature flag
# #
# Usage: # Usage:
# #
......
...@@ -4,114 +4,141 @@ ...@@ -4,114 +4,141 @@
redis_slot: compliance redis_slot: compliance
category: compliance category: compliance
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_compliance_audit_events - name: g_compliance_audit_events
category: compliance category: compliance
redis_slot: compliance redis_slot: compliance
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: i_compliance_audit_events - name: i_compliance_audit_events
category: compliance category: compliance
redis_slot: compliance redis_slot: compliance
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: i_compliance_credential_inventory - name: i_compliance_credential_inventory
category: compliance category: compliance
redis_slot: compliance redis_slot: compliance
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: a_compliance_audit_events_api - name: a_compliance_audit_events_api
category: compliance category: compliance
redis_slot: compliance redis_slot: compliance
aggregation: weekly aggregation: weekly
feature_flag: usage_data_a_compliance_audit_events_api
# Analytics category # Analytics category
- name: g_analytics_contribution - name: g_analytics_contribution
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_analytics_insights - name: g_analytics_insights
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_analytics_issues - name: g_analytics_issues
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_analytics_productivity - name: g_analytics_productivity
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_analytics_valuestream - name: g_analytics_valuestream
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_pipelines - name: p_analytics_pipelines
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_code_reviews - name: p_analytics_code_reviews
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_valuestream - name: p_analytics_valuestream
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_insights - name: p_analytics_insights
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_issues - name: p_analytics_issues
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_repo - name: p_analytics_repo
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: i_analytics_cohorts - name: i_analytics_cohorts
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: i_analytics_dev_ops_score - name: i_analytics_dev_ops_score
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_analytics_merge_request - name: g_analytics_merge_request
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: p_analytics_merge_request - name: p_analytics_merge_request
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: i_analytics_instance_statistics - name: i_analytics_instance_statistics
category: analytics category: analytics
redis_slot: analytics redis_slot: analytics
aggregation: weekly aggregation: weekly
feature_flag: track_unique_visits
- name: g_edit_by_web_ide - name: g_edit_by_web_ide
category: ide_edit category: ide_edit
redis_slot: edit redis_slot: edit
expiry: 29 expiry: 29
aggregation: daily aggregation: daily
feature_flag: track_editor_edit_actions
- name: g_edit_by_sfe - name: g_edit_by_sfe
category: ide_edit category: ide_edit
redis_slot: edit redis_slot: edit
expiry: 29 expiry: 29
aggregation: daily aggregation: daily
feature_flag: track_editor_edit_actions
- name: g_edit_by_snippet_ide - name: g_edit_by_snippet_ide
category: ide_edit category: ide_edit
redis_slot: edit redis_slot: edit
expiry: 29 expiry: 29
aggregation: daily aggregation: daily
feature_flag: track_editor_edit_actions
- name: i_search_total - name: i_search_total
category: search category: search
redis_slot: search redis_slot: search
aggregation: weekly aggregation: weekly
feature_flag: search_track_unique_users
- name: i_search_advanced - name: i_search_advanced
category: search category: search
redis_slot: search redis_slot: search
aggregation: weekly aggregation: weekly
feature_flag: search_track_unique_users
- name: i_search_paid - name: i_search_paid
category: search category: search
redis_slot: search redis_slot: search
aggregation: weekly aggregation: weekly
feature_flag: search_track_unique_users
- name: wiki_action - name: wiki_action
category: source_code category: source_code
aggregation: daily aggregation: daily
...@@ -133,194 +160,242 @@ ...@@ -133,194 +160,242 @@
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_alert_status_changed
- name: incident_management_alert_assigned - name: incident_management_alert_assigned
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_alert_assigned
- name: incident_management_alert_todo - name: incident_management_alert_todo
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_alert_todo
- name: incident_management_incident_created - name: incident_management_incident_created
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_created
- name: incident_management_incident_reopened - name: incident_management_incident_reopened
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_reopened
- name: incident_management_incident_closed - name: incident_management_incident_closed
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_closed
- name: incident_management_incident_assigned - name: incident_management_incident_assigned
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_assigned
- name: incident_management_incident_todo - name: incident_management_incident_todo
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_todo
- name: incident_management_incident_comment - name: incident_management_incident_comment
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_comment
- name: incident_management_incident_zoom_meeting - name: incident_management_incident_zoom_meeting
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_zoom_meeting
- name: incident_management_incident_published - name: incident_management_incident_published
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_published
- name: incident_management_incident_relate - name: incident_management_incident_relate
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_relate
- name: incident_management_incident_unrelate - name: incident_management_incident_unrelate
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_unrelate
- name: incident_management_incident_change_confidential - name: incident_management_incident_change_confidential
redis_slot: incident_management redis_slot: incident_management
category: incident_management category: incident_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_incident_management_incident_change_confidential
# Testing category # Testing category
- name: i_testing_test_case_parsed - name: i_testing_test_case_parsed
category: testing category: testing
redis_slot: testing redis_slot: testing
aggregation: weekly aggregation: weekly
feature_flag: usage_data_i_testing_test_case_parsed
# Project Management group # Project Management group
- name: g_project_management_issue_title_changed - name: g_project_management_issue_title_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_description_changed - name: g_project_management_issue_description_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_assignee_changed - name: g_project_management_issue_assignee_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_made_confidential - name: g_project_management_issue_made_confidential
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_made_visible - name: g_project_management_issue_made_visible
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_created - name: g_project_management_issue_created
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_closed - name: g_project_management_issue_closed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_reopened - name: g_project_management_issue_reopened
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_label_changed - name: g_project_management_issue_label_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_milestone_changed - name: g_project_management_issue_milestone_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_iteration_changed - name: g_project_management_issue_iteration_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_weight_changed - name: g_project_management_issue_weight_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_cross_referenced - name: g_project_management_issue_cross_referenced
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_moved - name: g_project_management_issue_moved
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_related - name: g_project_management_issue_related
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_unrelated - name: g_project_management_issue_unrelated
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_marked_as_duplicate - name: g_project_management_issue_marked_as_duplicate
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_locked - name: g_project_management_issue_locked
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_unlocked - name: g_project_management_issue_unlocked
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_added_to_epic - name: g_project_management_issue_added_to_epic
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_removed_from_epic - name: g_project_management_issue_removed_from_epic
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_changed_epic - name: g_project_management_issue_changed_epic
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_designs_added - name: g_project_management_issue_designs_added
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_designs_modified - name: g_project_management_issue_designs_modified
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_designs_removed - name: g_project_management_issue_designs_removed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_due_date_changed - name: g_project_management_issue_due_date_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_time_estimate_changed - name: g_project_management_issue_time_estimate_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_time_spent_changed - name: g_project_management_issue_time_spent_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_comment_added - name: g_project_management_issue_comment_added
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_comment_edited - name: g_project_management_issue_comment_edited
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_comment_removed - name: g_project_management_issue_comment_removed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
- name: g_project_management_issue_health_status_changed - name: g_project_management_issue_health_status_changed
category: issues_edit category: issues_edit
redis_slot: project_management redis_slot: project_management
aggregation: daily aggregation: daily
feature_flag: track_issue_activity_actions
# Secrets Management # Secrets Management
- name: i_ci_secrets_management_vault_build_created - name: i_ci_secrets_management_vault_build_created
category: ci_secrets_management category: ci_secrets_management
redis_slot: ci_secrets_management redis_slot: ci_secrets_management
aggregation: weekly aggregation: weekly
feature_flag: usage_data_i_ci_secrets_management_vault_build_created
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